ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
As a PHP extension ImageMagick has less memory consumption compares to GD, which is the default graphic use in PHP.
- Download ImageMagick software from ImageMagick website, when I wrote this tutorial it’s ImageMagick-7.0.2-0-Q16-x64-dll.exe.
- Safe install (less problematic path) it to C:\ImageMagick, remember to check install path to Windows environments.
- Now download PHP ImageMagick extension from PHP PECL website, I’m using the 5.6 Thread Safe (TS) x86 .
- Now, open the zip file and extract php_imagick.dll to your PHP extension directory.
- From the same zip file extract all files start with CORE_RL_* to your Apache\bin directory.
- Open your php.ini file, which is usually at your PHP directory, and add ImageMagick extension: extension=php_imagick.dll to the list of extensions.
- Restart Apache, and checkout phpinfo(), if you’re succeed it’s listed there: