Last active
July 3, 2022 13:13
-
-
Save joelotz/901b3d21b171a64b9e1a4191edc061da to your computer and use it in GitHub Desktop.
How to install ImageMagick with HEIC and WEBP support on Ubuntu 20.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -- Credits -- | |
# copied from https://gist.github.com/hurricup/e14ae5bc47705fca6b1680e7a1fb6580 | |
# which in turn was inspired by https://gist.github.com/rjnienaber/af47fccb8410926ba7ea35f96c3b87fd | |
# 1. Remove old bundled ImageMagick program | |
sudo apt remove imagemagick -y | |
# 1b. Update and install libraries for buidling from source | |
sudo apt update | |
sudo apt install build-essential | |
# 2. Install base dependencies | |
sudo apt-get install -y \ | |
libde265-dev \ | |
libdjvulibre-dev \ | |
libfftw3-dev \ | |
libghc-bzlib-dev \ | |
libgoogle-perftools-dev \ | |
libgraphviz-dev \ | |
libgs-dev \ | |
libheif-dev \ | |
libjbig-dev \ | |
libjemalloc-dev \ | |
libjpeg-dev \ | |
liblcms2-dev \ | |
liblqr-1-0-dev \ | |
liblzma-dev \ | |
libopenexr-dev \ | |
libpango1.0-dev \ | |
libraqm-dev \ | |
libraw-dev \ | |
libtiff-dev \ | |
libwebp-dev \ | |
libwmf-dev \ | |
libzip-dev \ | |
libzstd-dev | |
# 3. Install it | |
git clone --depth 1 --branch 7.1.0-39 https://github.com/ImageMagick/ImageMagick.git | |
cd ImageMagick | |
# 4. Configure the installatino | |
./configure \ | |
--with-bzlib=yes \ | |
--with-djvu=yes \ | |
--with-fftw=yes \ | |
--with-fontconfig=yes \ | |
--with-freetype=yes \ | |
--with-gslib=yes \ | |
--with-gvc=yes \ | |
--with-heic=yes \ | |
--with-jbig=yes \ | |
--with-jemalloc=yes \ | |
--with-jpeg=yes \ | |
--with-lcms=yes \ | |
--with-lqr=yes \ | |
--with-lzma=yes \ | |
--with-magick-plus-plus=yes \ | |
--with-openexr=yes \ | |
--with-openjp2=yes \ | |
--with-pango=yes \ | |
--with-perl=yes \ | |
--with-png=yes \ | |
--with-raqm=yes \ | |
--with-raw=yes \ | |
--with-rsvg=yes \ | |
--with-tcmalloc=yes \ | |
--with-tiff=yes \ | |
--with-webp=yes \ | |
--with-wmf=yes \ | |
--with-x=yes \ | |
--with-xml=yes \ | |
--with-zip=yes \ | |
--with-zlib=yes \ | |
--with-zstd=yes | |
# 5. Run make install | |
make -j 8 | |
sudo make install | |
sudo ldconfig /usr/local/lib | |
# 6. Last step! Check installation | |
identify --version | |
# 7. You should see something like this | |
# -------------------------------------- | |
# Version: ImageMagick 7.1.0-10 Q16-HDRI x86_64 2021-10-03 https://imagemagick.org | |
# Copyright: (C) 1999-2021 ImageMagick Studio LLC | |
# License: https://imagemagick.org/script/license.php | |
# Features: Cipher DPC HDRI OpenMP(4.5) | |
# Delegates (built-in): fontconfig freetype heic jp2 png webp x xml zlib | |
# Compiler: gcc (10.3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment