How to Install ImageMagick on Ubuntu


Use ImageMagick to create, edit, compose or convert bitmap pix. It could actually read and write snapshots in a type of codecs (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and develop into snapshots, alter image colors, follow various certain effects, or draw text, lines, polygons, ellipses and Bézier curves.This article explains about -“How to Install ImageMagick on Ubuntu”

Before installing ImageMagick, It should be required, to build essentials as shown below –

$sudo apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y

The sample output should be like this –

Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
The following NEW packages will be installed:
  checkinstall
0 upgraded, 1 newly installed, 0 to remove and 204 not upgraded.
Need to get 121 kB of archives.
After this operation, 516 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 checkinstall amd64 1.6.2-4ubuntu1 [121 kB]
Fetched 121 kB in 0s (162 kB/s)      
..................................................................................

Now download The ImageMagick, as shown below –

$sudo wget http://www.imagemagick.org/download/ImageMagick.tar.gz

The sample output should be like this –

--2017-01-27 11:49:08--  http://www.imagemagick.org/download/ImageMagick.tar.gz
Resolving www.imagemagick.org (www.imagemagick.org)... 198.72.81.86
Connecting to www.imagemagick.org (www.imagemagick.org)|198.72.81.86|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12746042 (12M) [application/x-gzip]
Saving to: ‘ImageMagick.tar.gz’

ImageMagick.tar.gz  100%[===================>]  12.16M  1.28MB/s    in 14s     

2017-01-27 11:49:22 (907 KB/s) - ‘ImageMagick.tar.gz’ saved [12746042/12746042]

Unzip the downloaded file as shown below –

$sudo tar xzvf ImageMagick.tar.gz

The sample output should be like this –

ImageMagick-7.0.4-5/PerlMagick/t/ttf/
ImageMagick-7.0.4-5/PerlMagick/t/ttf/read.t
ImageMagick-7.0.4-5/PerlMagick/t/ttf/input.ttf
ImageMagick-7.0.4-5/PerlMagick/t/composite.t
ImageMagick-7.0.4-5/PerlMagick/t/input.dib
ImageMagick-7.0.4-5/PerlMagick/t/input_p5.pgm
ImageMagick-7.0.4-5/PerlMagick/t/input_70x46.uyvy
ImageMagick-7.0.4-5/PerlMagick/t/input.im8
ImageMagick-7.0.4-5/PerlMagick/t/input.sgi
ImageMagick-7.0.4-5/PerlMagick/t/png/
ImageMagick-7.0.4-5/PerlMagick/t/png/input.mng
ImageMagick-7.0.4-5/PerlMagick/t/png/write.t
ImageMagick-7.0.4-5/PerlMagick/t/png/read-16.t
ImageMagick-7.0.4-5/PerlMagick/t/png/input_256.png
ImageMagick-7.0.4-5/PerlMagick/t/png/input_bw.png
ImageMagick-7.0.4-5/PerlMagick/t/png/input_truecolor.png
ImageMagick-7.0.4-5/PerlMagick/t/png/write-16.t
ImageMagick-7.0.4-5/PerlMagick/t/png/input_mono.png
..........................................................................

To verify the above command, use the following command –

$ ls 

The sample output should be like this –

ImageMagick-7.0.4-5  ImageMagick.tar.gz

Now enter into extracted directory as shown below –

$cd ImageMagick-7.0.4-5 

To check configuration, use the following command –

~/ImageMagick-7.0.4-5# ./configure

To build the source code, use the following commands as shown below –

~/ImageMagick-7.0.4-5# make clean
~/ImageMagick-7.0.4-5# make
~/ImageMagick-7.0.4-5# checkinstall
~/ImageMagick-7.0.4-5# ldconfig /usr/local/lib

To get more infomation about magick, use the following command –

$ magick -help

The sample output should be like this –

Usage: magick [ {option} | {image} ... ] {output_image}
       magick [ {option} | {image} ... ] -script {filename} [ {script_args} ...]
       magick -help | -version | -usage | -list {option}

To get the version of magick, use the following command –

$ magick -version

The sample output should be like this –

Version: ImageMagick 7.0.4-5 Q16 x86_64 2017-01-27 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP 
Delegates (built-in): x zlib

In this article, we have learnt about – How to Install ImageMagick on Ubuntu, we will come up with more Linux based tricks and tips. Keep reading!

Other Interesting Posts

Advertisements