This guide will walk you through installing ImageMagick from source on a Linux system (Debian/Ubuntu-based) and configuring it with HEIC format support.
First, clone the official ImageMagick Git repository into /usr/local/src:
sudo git clone https://github.com/ImageMagick/ImageMagick.git /usr/local/src/ImageMagick