ImageMagick is a powerful command-line tool for manipulating images on a Linux system. Some benefits of using ImageMagick include converting, cropping, resizing images, and adding effects like transparency and text overlays.
Features of ImageMagick include:
- Image conversion between various formats (e.g., JPG to PNG)
- Basic image editing (e.g., cropping, resizing)
- Advanced image manipulation (e.g., adding effects, overlaying text)
- Support for large numbers of image formats
- Support for large images
This tutorial will guide you through installing ImageMagick on a Fedora Linux system, either as a workstation or server, using the DNF package manager, or by building from the source.
Table of Contents
Step 1: Update Fedora
Before installing ImageMagick, it is recommended to check and ensure that 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
Method 1: Install ImageMagick with DNF Package Manager
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
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 version of ImageMagick that is currently installed on your system.
Method 2: Install ImageMagick from 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.
First, install the following dependencies.
sudo dnf install gcc clang make
Download the latest version of ImageMagick from the official GitHub. Note you need to go to GitHub to grab the link; the below command is just an example.
wget https://github.com/ImageMagick/ImageMagick/archive/refs/tags/x.x.x-x.tar.gz
Extract the downloaded archive using the command:
tar xvzf <imagemagick archive>.tar.gz
Change to the extracted directory using the command:
cd ImageMagick-*.*
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
Example output if successful:
ImageMagick Terminal Commands
Below is a table of commands and tools that can be used with ImageMagick.
Command | Definition |
---|---|
convert | The central command for image conversion and manipulation |
mogrify | A command for modifying images in place without creating a new copy |
identify | A command for displaying information about an image, such as format, dimensions, and color depth |
composite | A command for combining two images into a single image |
montage | A command for creating a composite image by arranging multiple images in a grid |
animate | A command for creating an animation from a sequence of images |
compare | A command for comparing two images and highlighting differences between them |
conjure | A command for executing scripts written in the Magick Scripting Language (MSL) |
stream | A command for converting between image formats while streaming |
display | A command for displaying images on the screen |
import | A command for capturing screenshots |
mogrify | A command for modifying images in place without creating a new copy |
magick | A command for executing scripts written in the Magick Scripting Language (MSL) |
magick-script | A command for running scripts written in the Magick Scripting Language (MSL) |
magick-script-command | A command for executing commands written in the Magick Scripting Language (MSL) |
Note: These are some of the basic commands offered by ImageMagick, there are many more commands you can use to do more advanced manipulation, but the above commands are a good starting point to explore the functionality of ImageMagick.
Commands and Conclusion
In this article, we discussed two different methods for installing ImageMagick on a Fedora system – using the DNF package manager and building from source. Both methods are easy to follow and will get you up and running with ImageMagick in no time. With ImageMagick installed, you can now use its powerful command-line tools to manipulate images on your Fedora system.
For additional information, please visit the official ImageMagick website.