Imagick is a very useful PHP extension to create edit, compose bitmap images and modify images and it can be done by ImageMagick API.  Also support to convert into different types of formats (over 100) including PhotoCD, PNG, Postscript, SVG, DPX, EXR, GIF, JPEG, JPEG-2000, PDF, and TIFF.

On this post can be know how to configure the Imagick extension in XAMPP.

Download the Extension :

Download the imagick extension from the below url using wget command and extract it.

# wget http://pecl.php.net/get/imagick-3.2.0RC1.tgz

# tar -xf imagick-3.2.0RC1.tgz

# cd  imagick

Installation:
 
# /opt/lampp/bin/phpize

Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

If you got the error like above you need to install the AUTOCONF
 
#  ./configure --with-php-config=/opt/lampp/bin/php-config

checking if nawk is broken... no
checking whether to enable the imagick extension... yes, shared
checking whether to make Imagick respect PHP memory limits... no
checking for pkg-config... no
pkg-config not found
configure: error: Please reinstall the pkg-config distribution


If you have received the configure error: Please reinstall the pkg-config distribution

You need to install that package on your system using apt-get
 
# apt-get install pkg-config

Once you have done it, again execute the below commands: configure, make and make install.
 
# ./configure --with-php-config=/opt/lampp/bin/php-config

#  make

# make install

Installing shared extensions:     /opt/lampp/lib/php/extensions/no-debug-non-zts-20121212/
Installing header files:          /opt/lampp/include/php/

Finally, the imagick.so extension  dropped in the extension directory like,
 
# cd /opt/lampp/lib/php/extensions/no-debug-non-zts-20121212

# ls
 imagick.so  oci8.so  opcache.so  pgsql.so  radius.so  xdebug.so

Open the PHP configure file and include the extension name: imagick.so
 
# vim /opt/lampp/etc/php.ini

extension="imagick.so"

Or

extension="/opt/lampp/lib/php/extensions/no-debug-non-zts-20121212/imagick.so"

Restart the XAMPP,
 
# /opt/lampp/lampp restart