Add HEIF conversion support to ImageMagick (#473)

Add HEIF conversion support to ImageMagick (#473)

diff --git a/image/base/Dockerfile b/image/base/Dockerfile
index e4dd449..1a69710 100644
--- a/image/base/Dockerfile
+++ b/image/base/Dockerfile
@@ -87,7 +87,7 @@ ADD install-imagemagick /tmp/install-imagemagick
 RUN /tmp/install-imagemagick
 
 # Validate install
-RUN ruby -Eutf-8 -e "v = \`convert -version\`; %w{png tiff jpeg freetype}.each { |f| unless v.include?(f); STDERR.puts('no ' + f +  ' support in imagemagick'); exit(-1); end }"
+RUN ruby -Eutf-8 -e "v = \`convert -version\`; %w{png tiff jpeg freetype heic}.each { |f| unless v.include?(f); STDERR.puts('no ' + f +  ' support in imagemagick'); exit(-1); end }"
 
 ADD install-pngcrush /tmp/install-pngcrush
 RUN /tmp/install-pngcrush
diff --git a/image/base/install-imagemagick b/image/base/install-imagemagick
index e8debe0..8a52eba 100755
--- a/image/base/install-imagemagick
+++ b/image/base/install-imagemagick
@@ -14,7 +14,7 @@ WDIR=/tmp/imagemagick
 
 # Install build deps
 apt -y -q remove imagemagick
-apt -y -q install ghostscript gsfonts pkg-config autoconf libbz2-dev libjpeg-dev libtiff-dev libfreetype6-dev
+apt -y -q install ghostscript gsfonts pkg-config autoconf libbz2-dev libjpeg-dev libtiff-dev libfreetype6-dev libheif-dev
 
 mkdir -p $WDIR
 cd $WDIR
@@ -55,7 +55,8 @@ PKG_CONF_LIBDIR=$PREFIX/lib LDFLAGS=-L$PREFIX/lib CFLAGS=-I$PREFIX/include ./con
           --without-lcms \
           --with-lzma \
           --with-png \
-          --with-tiff
+          --with-tiff \
+          --with-heic
 make all && make install
 
 cd $HOME

GitHub sha: 8dc661f5

1 Like

This commit appears in #473 which was approved by CvX. It was merged by pmusaraj.