How to Install ImageMagick on Fedora 35

ImageMagick is a free, open-source application installed as a binary distribution or source code. ImageMagick can convert, read, write and process raster images. ImageMagick is also available across all major platforms, including Android, BSD, Linux, Windows, Mac OSX, iOS, and many others.

In the following tutorial, you will learn how to install ImageMagick on Fedora 35 Workstation or Server using the DNF or Source installation method.

Advertisement

Prerequisites

  • Recommended OS: Fedora Linux 35.
  • User account: A user account with sudo or root access.

Update Operating System

Update your Fedora operating system to make sure all existing packages are up to date:

sudo dnf upgrade --refresh -y

The tutorial will be using the sudo command and assuming you have sudo status.

To verify sudo status on your account:

sudo whoami

Example output showing sudo status:

[joshua@fedora ~]$ sudo whoami
root

To set up an existing or new sudo account, visit our tutorial on Adding a User to Sudoers on Fedora.

To use the root account, use the following command with the root password to log in.

su

Install Dependency Required

Before you proceed with the installation, run the following command to install or check that the package dnf-plugins-core is installed on your Fedora desktop.

sudo dnf install dnf-plugins-core -y

By default, this should be installed.

The tutorial will utilize the terminal, which can be found in your show applications menu.

Example:

How to Install ImageMagick on Fedora 35

Option 1 – Install ImageMagick – DNF Method (Recommended)

By default, ImageMagick is featured in Fedora 35’s repository. This is the recommended way to install the application, given it is almost always up to date with the latest version.

In your terminal, use the following command to begin the installation.

sudo dnf install ImageMagick

Example output:

How to Install ImageMagick on Fedora 35

Type Y, then press the ENTER KEY to proceed and complete the installation.

Alternatively, you can also install the development branch of ImageMagick if you require it.

 sudo dnf install ImageMagick-devel

Once the installation has been completed, verify the install by checking the build and version.

convert --version

Example output:

How to Install ImageMagick on Fedora 35

Updates will be handled using the standard system update command.

sudo dnf upgrade --refresh -y

To remove ImageMagick from your system, use the following command.

Remove ImageMagick:

sudo dnf remove ImageMagick -y

Remove ImageMagick Development Branch:

sudo dnf remove ImageMagick-devel -y

Note, this will also remove all unused dependencies for complete removal.

Advertisement

Option 2 – Compile Latest Bleeding Edge ImageMagick from Source

This installation choice isn’t recommended for the average user. However, follow the steps below for those wanting to use the source version.

Firstly, make sure you have GIT installed:

sudo dnf install git -y

Now clone the GIT:

sudo git clone https://github.com/ImageMagick/ImageMagick.git /usr/local/src/ImageMagick

Note, depending on how you set your GIT up, you may need to use the sudo command.

Next, CD into the directory:

cd /usr/local/src/ImageMagick

Now install the dependencies required:

sudo dnf install make automake cmake gcc libtool-ltdl-devel -y

You will now need to use the ./configure command:

sudo ./configure

Advanced users want more from ImageMagick it is recommended to use –with-modules build:

sudo ./configure --with-modules

Now that you have built and configured the environment, it is time to compile it with the command make.

sudo make

A handy trick is to specify the -j <number of cpu> as this can significantly increase compiling speed if you have a powerful server.

For example, the LinuxCapable server has 6 CPUs, and I can use all 6 or at least use 4 to 5 to increase speed.

Example only:

sudo make -j 6

After compiling the source code, now run the installation command in your terminal:

sudo make install

After the installation, you need to configure the dynamic linker run-time bindings:

sudo ldconfig /usr/local/lib

Now verify the installation and build:

magick --version

Example output:

How to Install ImageMagick on Fedora 35

Updating ImageMagick from Source

If you installed ImageMagick from source using git, re-peat the installation process after you have pulled any new changes from the sources Github using the following terminal command:

sudo git pull

Once imported, repeat the process to install the update.

Test & Verify ImageMagick

The quickest way to test if ImageMagick is working is to use the convert logo command.

sudo convert logo: logo.gif

Then list the directory using the ls command:

ls

Example:

How to Install ImageMagick on Fedora 35

Example Terminal Commands

Below is a table of commands and tools that can be used with ImageMagick:

CommandDescription
animateDisplay an image sequence as an animation.
compareAnalyze two images, and visualize mathematical differences between them.
compositeCompose one image over another with variable transparency to create a composite image.
conjureInterpret and execute scripts written in MSL, the Magick Scripting Language.
convertConvert images from one file format to another. This tool can also blur, crop, despeckle, dither, and otherwise modify the content of an image.
displayA simple image viewer.
identifyDisplay the image dimensions, quality, and other image metadata.
importCapture the screen to an image file.
mogrifyModify an image. Similar to converting, but overwrites the original image.
montageCreate an image composed of smaller images. This command can create a single image containing thumbnails of many images.
streamProcess image data and store it in a file as it is being streamed from an input source. Useful for situations with slow data streams or huge images whose data processing should begin before the entire image is stored.

Commands and Conclusion

In the tutorial, you have learned two ways to install ImageMagick on Fedora 35 Workstation or Server. Overall, ImageMagick is still quite popular, especially around WordPress websites and plugins, and is a tried and tested option for displaying, creating, converting, modifying, and editing raster images.

For additional information, please visit the official ImageMagick website.

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
adplus-dvertising
0
Would love your thoughts, please comment.x
()
x