This guide will walk you through installing ImageMagick from source on a Linux system (Debian/Ubuntu-based) and configuring it with HEIC format support.
1. Clone ImageMagick Repository
First, clone the official ImageMagick Git repository into /usr/local/src
:
sudo git clone https://github.com/ImageMagick/ImageMagick.git /usr/local/src/ImageMagick
2. Change Directory to ImageMagick
Navigate to the directory where ImageMagick was cloned:
cd /usr/local/src/ImageMagick
3. Install Dependencies
Install the necessary build tools and library dependencies to build ImageMagick with various format support, including HEIC:
sudo apt install build-essential libltdl-dev libjpeg-dev libpng-dev libtiff-dev libwebp-dev libgif-dev libheif-dev libfreetype6-dev liblcms2-dev libxml2-dev ghostscript
4. Configure ImageMagick
Run the following command to configure ImageMagick with modules support:
./configure --with-modules
Additionally, configure ImageMagick with HEIC support:
./configure --with-heic=yes
5. Verify HEIC Support
After the build, you can check if HEIC support is enabled by running:
identify -list format | grep HEIC
This command will list all supported formats and filter for HEIC to verify it is enabled.
6. Build ImageMagick Environment
After building and configuring the environment, compile ImageMagick using the make command:
sudo make
7. Install ImageMagick via Compiled Binary
With the source code compiled, the next step is to run the installation command. This will install ImageMagick on your Ubuntu system:
sudo make install
8. Configure Dynamic Linker Run-Time for ImageMagick
After installing ImageMagick, configure the dynamic linker run-time bindings as the final step. This action ensures your system can find and use the ImageMagick libraries during run-time:
sudo ldconfig /usr/local/lib
This command will configure the dynamic linker run-time bindings, making ImageMagick accessible and usable on your system.
After running this command, you should be able to use ImageMagick without any issues.
9. Verify ImageMagick Installation
Once you have installed ImageMagick, you can verify the installation by running the following command.
magick --version
Respons look like this
Version: ImageMagick x.x.x
https://imagemagick.org/script/command-line-processing.php
Additional Notes
- You can customize the ./configure command with other options depending on the formats or features you need.
- if you encounter missing libraries, ensure all necessary dependencies are installed. You may need to install additional ones depending on your system’s configuration.
Ref: https://linuxcapable.com/how-to-install-imagemagick-on-ubuntu-linux/
Top comments (1)
thankyou, its worked like a charm !