Posted on

Table of Contents

Dependencies

sudo apt update

sudo apt install libjpeg-dev libpng-dev libpng16-16 libltdl-dev libheif-dev libraw-dev libtiff-dev libopenjp2-tools libopenjp2-7-dev libjpeg-dev libjpeg-turbo-progs libfreetype6-dev libheif-dev libfreetype6-dev libopenexr-dev libpng-dev./configure --with-modules --with-quantum-depth=16 --with-jpeg=yes --with-png=yes --with-gif=yes --with-webp=yes --with-heic=yes --with-raw=yes --with-tiff=yes --with-openjp2 --with-jxl=yes --with-freetype=yes --with-webp --with-openexr --with-gslib --with-gif -V

From source

Use this guide: https://imagemagick.org/script/install-source.php and https://imagemagick.org/script/advanced-linux-installation.php

Be sure to use the most current version.

git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick-7.1.1-6

cd ImageMagick-7.1.1-6

./configure --with-modules --enable-file-type --with-quantum-depth=32 --with-jpeg=yes --with-png=yes --with-gif=yes --with-webp=yes --with-heic=yes --with-raw=yes --with-tiff=yes --with-openjp2 --with-freetype=yes --with-webp=yes --with-openexr=yes --with-gslib=yes --with-gif=yes --with-perl=yes --with-jxl=yes

make

sudo make install

sudo ldconfig /usr/local/lib

Errors

Watch for any image processing errors:

sudo journalctl -u mastodon-streaming -u mastodon-sidekiq -u mastodon-web -u nginx -f | grep -i error

Notes

I haven't been able to find JPEG XL dev package in the Ubuntu apt repos. Maybe i'll build from source.