Installing and Using ImageMagick with Imagick PHP Extension (php_imagick.dll) on WAMP

Posted: 2014-10-06 22:56:43

The php_imagick extension enables WAMP servers such as WampDeveloper Pro to create, edit, convert, and/or manipulate images via PHP using the ImageMagick software on Windows.

WampDeveloper Pro comes integrated with both the ImageMagick package and the Imagick PHP extension.

To enable the Imagick PHP Extension in WampDeveloper Pro:

1. Open file php.ini –

2. Near the end of php.ini, locate the ImageMagick section –


3. Uncomment the load line for this extension (remove the ‘;’ character from the beginning of the line) –


4. Save file. Restart Apache.

5. [optional] If not present already in your WAMP, download and extract PHP’s ImageMagick dependency files from, and into folder C:\WampDeveloper\Tools\ImageMagick\. Only extract the “\bin” files from the zip (and directly into the folder). This should match the environmental variable MAGICK_HOME=C:\WampDeveloper\Tools\ImageMagick set.

Afterwards, Imagick will be loaded by PHP and you can verify this via phpinfo.php…


5. Test imagick:

A. Create a scaled thumbnail image…


// if full path is not specified, will look for file in Apache's folder.

$im = new imagick('C:\WampDeveloper\Websites\\webroot\imagick\pic.jpg');

// resize by 200 width and keep the ratio
$im->thumbnailImage(200, 0);

// if full path is not specified, file will end up in Apache's folder.

// write to disk

echo 'Image Thumbnail Created.';


B. Covert JGP image to PNG image format…


$image = 'C:\WampDeveloper\Websites\\webroot\imagick\pic.jpg';

// a new imagick object
$im = new Imagick();

// ping the image

// read the image into the object

// convert to png

// write image to disk

echo 'Image Converted.';