Install ImageMagick and PHP-iMagick

Filed Under (Cpanel, Linux Tips, Plesk For Linux, Softwares) by Milind on 04-11-2011

What is ImageMagick?

ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats and it is used to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

What is PHP-iMagick?

Imagick is a native php extension to create and modify images using the ImageMagick API

Installation of ImageMagick

1) Download the latest version of ImageMagick from ImageMagick website i.e. http://www.imagemagick.org/script/download.php (select the mirror near to your server for fast download). Use following command to download ImageMagick

[root@support007 src]# wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.5.7-10.tar.gz

im1 300x143 Install ImageMagick and PHP iMagick

2) Extract and go inside the ImageMagick Folder

[root@support007 src]# tar -zxf ImageMagick-6.5.7-10.tar.gz[root@support007 src]# cd ImageMagick-6.5.7-10

3) Configure: You can run ./configure –help to see the advance option and select the options as per your requirement. I will go ith default settings/configurations

[root@support007 ImageMagick-6.5.7-10]# ./configure

im2 300x143 Install ImageMagick and PHP iMagick

4) Once configure completes (without Error) and you get following screen run make & make install


im3 300x143 Install ImageMagick and PHP iMagick

[root@support007 ImageMagick-6.5.7-10]# make

im4 300x143 Install ImageMagick and PHP iMagick
im5 300x143 Install ImageMagick and PHP iMagick

[root@support007 ImageMagick-6.5.7-10]# make install

im6 300x143 Install ImageMagick and PHP iMagick
im7 300x143 Install ImageMagick and PHP iMagick

If the above commands get executed without any errors, !!! Congratulations you have installed ImageMagick on your Server. Now you can check the Imagemagick version using following command

[root@support007 src]# convert -versionVersion: ImageMagick 6.5.7-10 2009-12-07 Q16 http://www.imagemagick.orgCopyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

im8 300x143 Install ImageMagick and PHP iMagick

Installation of PHP-iMagick

1) Download, extract and go to PHP-iMagick directory

[root@support007 src]# wget http://pecl.php.net/get/imagick-2.3.0.tgz[root@support007 src]# tar zxf imagick-2.3.0.tgz[root@support007 src]# cd imagick-2.3.0[root@support007 imagick-2.3.0]#

im13 300x98 Install ImageMagick and PHP iMagick

2) Execute phpize command to prepare the build environment for a PHP extension and after that run “./configure”

[root@support007 imagick-2.3.0]# phpize[root@support007 imagick-2.3.0]# ./configure

im9 300x143 Install ImageMagick and PHP iMagick

3) Run make and make install to complete the installation.

[root@support007 imagick-2.3.0]# make[root@support007 imagick-2.3.0]# make install

im11 300x143 Install ImageMagick and PHP iMagick

im12 300x143 Install ImageMagick and PHP iMagick

4) Add following line in php.ini file to enable imagick extension with PHP. Make sure that the extension is installed in the Directoy mentioned as extension_dir in php.ini

extension=imagick.so

5) Restart Apache Webserver and create a PHPINFO file in web server’s document root with code “”. Now browse the File and check if you get following results

im14 284x300 Install ImageMagick and PHP iMagick

Related posts:

  1. Installation of GNUPG and GNUPG-PHP extension
  2. How to Install MP4Box on Linux Server

Leave a Reply

You must be logged in to post a comment.

Follow US

Enter your email address:


I'm listed in Technology

Sponsors

Advertisement

Become Fan

tag cloud