How to Install ImageMagick on Fedora 40 or 39

ImageMagick is a powerful, feature-rich software suite for image editing, conversion, and creation. It supports various image formats, offering flexibility for various image processing tasks. ImageMagick is renowned for its versatility, ImageMagick is a powerful, open-source software suite used for creating, editing, converting, and displaying images in over 200 formats. It is widely utilized by developers, graphic designers, and system administrators for batch processing of images, creating animations, and performing complex image transformations. Whether you need to automate image processing tasks or integrate image manipulation into your applications, ImageMagick provides the tools necessary to handle almost any image-related task.

On Fedora 40 or 39, you can install ImageMagick using two primary methods via the command-line terminal. The first method is through Fedora AppStream, which offers a stable and straightforward installation from Fedora’s official repositories. This is the recommended method for most users. Alternatively, for those who require the latest features or wish to customize their installation, you can download and compile the latest ImageMagick binary build from the source archive. This guide will walk you through both installation methods to ensure you have ImageMagick set up to meet your needs.

Method 1: Install ImageMagick via DNF

Update Fedora Before ImageMagick Installation

Before installing ImageMagick, it is recommended to ensure your system is up-to-date to prevent any potential issues. This can be done by running a system upgrade check to update all packages to their latest versions.

sudo dnf upgrade --refresh

Install ImageMagick via DNF Command

The DNF package manager is the default package manager for Fedora systems. To install ImageMagick using DNF, use the following terminal command.

sudo dnf install ImageMagick

Confirm ImageMagick Installation via DNF

This command will install the latest version of ImageMagick and its dependencies on your system. Once the installation is complete, you can verify the installation by running the command.

convert --version

This command will display the ImageMagick version currently installed on your system.

Method 2: Install ImageMagick via source

Another way to install ImageMagick on a Fedora system is to build it from the source. This method allows you to install a specific version of ImageMagick or customize the build options. To install ImageMagick from the source, follow these steps.

Install Initial Packages For ImageMagick Installation

First, install the following dependencies:

sudo dnf install gcc clang make

Download ImageMagick Archive

Download the latest version of ImageMagick from the official GitHub. To grab the link, go to GitHub; the command below is just an example.

wget https://github.com/ImageMagick/ImageMagick/archive/refs/tags/x.x.x-x.tar.gz

Extract ImageMagick Archive

Extract the downloaded archive using the command:

tar xvzf <imagemagick archive>.tar.gz

Change to the extracted directory using the command:

cd ImageMagick-*.*

Configure, Build and Install ImageMagick Binary

Configure the build using the command.

./configure

Build and install ImageMagick using the command.

make
sudo make install

Once the installation is complete, you can verify the installation by running the command.

convert -version

ImageMagick Terminal Commands

Below is a table of commands and tools that ImageMagick can use.

CommandDefinition
convertThe central command for image conversion and manipulation
mogrifyA command for modifying images in place without creating a new copy
identifyA command for displaying information about an image, such as format, dimensions, and color depth
compositeA command for combining two images into a single image
montageA command for creating a composite image by arranging multiple images in a grid
animateA command for creating an animation from a sequence of images
compareA command for comparing two images and highlighting differences between them
conjureA command for executing scripts written in the Magick Scripting Language (MSL)
streamA command for converting between image formats while streaming
displayA command for displaying images on the screen
importA command for capturing screenshots
mogrifyA command for modifying images in place without creating a new copy
magickA command for executing scripts written in the Magick Scripting Language (MSL)
magick-scriptA command for running scripts written in the Magick Scripting Language (MSL)
magick-script-commandA command for executing commands written in the Magick Scripting Language (MSL)

These are some of ImageMagick’s basic commands. You can use many more commands to perform more advanced manipulation, but the above commands are a good starting point for exploring its functionality.

Conclusion

With ImageMagick installed on your Fedora system, you can take full advantage of its extensive image processing capabilities. The Fedora AppStream method provides a simple and stable installation path, perfect for most users. However, if you need the latest features or a customized build, compiling ImageMagick from the source gives you that flexibility. Regular updates, especially when compiling from source, will ensure your installation remains current, allowing you to leverage ImageMagick’s powerful tools effectively on Fedora.

Leave a Comment