First, Let’s Understand the Difference:
(1) Imagick is a PHP extension that uses the API provided by ImageMagick to create and modify images. However, these operations are already wrapped into the imagick extension, and ultimately it calls the API provided by ImageMagick.
(2) ImageMagick is a software suite primarily used for image creation, editing, and conversion, etc. For a detailed explanation, see the ImageMagick official website http://www.imagemagick.org/. ImageMagick offers significantly higher performance compared to GD, especially when processing a large number of images.
1. Download and Install ImageMagick
- wget ftp://mirror.aarnet.edu.au/pub/imagemagick/ImageMagick-6.6.8–10.tar.gz
- tar -xzvf ImageMagick-6.6.8–10.tar.gz
- ./configure –prefix=/usr/local/imagemagick
- make
- make install
2. Download and Install Imagick
Note: Installing this extension does not require ImageMagick to be installed
Find the latest version of imagick from http://pecl.php.net/package/imagick
- wget http://pecl.php.net/get/imagick-3.1.0RC1.tgz
- tar -xzvf imagick-3.1.0RC1
- phpize
- ./configure –with-php-config=/usr/local/php/bin/php-config –with-imagick=/usr/local/imagemagick
- make
- make install
The execution result shows:
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
Installing header files: /usr/local/php/include/php/
This generates imagick.so in /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/. Then manually configure php.ini to make it effective.
