PHP - Installing Image Magick on Windows XP with PHP 5.2.X

From Global Programming Syntax

Jump to: navigation, search

In This tutorial you will learn how to install ImageMagick on Windows XP with PHP 5.2. To start of with open this page to get ImageMagick. The version you will need to select is called "ImageMagick-6.5.9-0-Q16-windows-dll.exe". Then next step is to install the program. If it is a server then you would need to use command line or if your using XAMPP or WAMPP then you can just double click the file. Then you will be asked to install the software. Select yes and go through the installer. After that you will need to download the dll to link in with the program. The dll is in the category called 080709. Inside that category you will need to choose the file called "php_imagick_st-Q16.dll". Download it and place it into your php extension directory. Then rename the dll to "php_imagick.dll". Now go into your php.ini file and add the following.

extension=php_imagick.dll

Be sure the line doesn't start with the ; symbol. And after you have done that, stop the apache and tomcat services. Then restart the apache and tomcat services. Test the following script and if it works then success it is installed.

<?php
$im = new Imagick();
$im->newPseudoImage(100, 100, "magick:rose");
$im->setImageFormat("png");
$im->roundCorners(5,3);
$type=$im->getFormat();
header("Content-type: $type");
echo $im->getimageblob();
?>

Recourses

Other Rounded Details

Personal tools
languages
page stats
Toolbox