ImageMagick is a free, open-source, and cross-platform application that is used to create, convert and modify images. It was developed by John Cristy in 1987.
ImageMagick utilizes multiple computational threads to increase the performance and support over 200 image file formats
In this article, I will discuss how to install and use ImageMagick in a Ubuntu system.
Features of ImageMagick
Some key features of ImageMagick are given below.
- Supports image file format conversion
- You can easily resize, rotate, crop, flip and trim an image.
- You can add shapes and text to an image.
- You can decorate an image by adding a border and frame to it.
- You add special effects such as blur, sharpen, tint, etc.
- You can create a gif animation file.
- Extract features, describe shapes and recognize patterns in images.
- Supports processing of large size images which is in Mega, Giga, or Tera pixels.
Installing ImageMagick from Ubuntu repository
You can download and install ImageMagick from the Ubuntu repository. This is one of the easiest ways to install a package in Ubuntu.
Use the given command to install ImageMagic –
sudo apt install imagemagick
If it asks for confirmation press y and then enter.
Installing ImageMagick from source
You need to download a few packages before you install ImageMagick on your Ubuntu system.
First, run the given command to update the package repository –
sudo apt update
Now use the given command to download the required packages –
sudo apt install build-essential
Download the ImageMagick source file from the download page on its official website. OR use the given command in your terminal to download it.
wget https://imagemagick.org/download/ImageMagick.tar.gz
After it gets downloaded extract its content by using –
tar xvzf ImageMagick.tar.gz
Move to extracted ImageMagick directory by using –
cd ImageMagick-7.1.0-4/
Compile and install ImageMagick
Use the given command to configure and compile the ImageMagick –
./configure
Next, use the given command to invoke the execution of make file –
make
Once the compilation of ImageMagick is done, use the following command to install the ImageMagick –
sudo make install
Now configure the dynamic linker run-time bindings by using –
sudo ldconfig /usr/local/lib
Verify the ImageMagick installation
After installing ImageMagick from any of the given methods. You can verify the installation by using the given command –
magick --version
This will display the version of ImageMagick installed on your system.
You can find the detailed ImageMagick command-line tools on its official website where you can also learn the usage of ImageMagick in terminal.
Conclusion
This is how you can install ImageMagick on your Ubuntu system. Now if you have a query then write us in the comments below.