ImageMagick + Imagick + PHP on XAMPP

Environment

Step for install

  1. Install Imagick (PHP Extention).
  2. Install DLL of extension module.
  3. Setting DLL.

What is DLL?

Difference of ImageMagick & Imagic refer to this site


1. Install ImageMagick (PHP Extention) under C:¥

Install PHP Extention.

You must install correct version which corresponded to your OS version. i installed 32 bit version ImageMagick-6.9.1-10-Q16-x86-dll.exe.

Confirm extension_dir of phpinfo(); below is ok.

extention_dir C:¥xampp¥php¥ext


Please install ImageMagic from this site because php work well only ver. 6.6.2.<- This is mistake, sorry.


2. Install DLL & Setting


2-1. Install PHP Extension

Install by PECL

!! Then confirm phpinfo(); you should select install.

  • Case of enabled > php_imagick.dll, TS
  • Case of disabled > php_imagick.dll, NTS

f:id:hrt0kmt:20150618022214p:plain

f:id:hrt0kmt:20150618020427p:plain


2-2. DLL file move into extension folder

php_imagick.dll in download folder move to C:¥xampp¥php¥ext


2-3. CORE_RL_* move into Apache binary folder

CORE_RL_* file move into C:¥xampp¥apache¥bin


2-4. Add extension to php.ini

You should write extension=php_imagick.dll on php.ini ( !! Write under [PECL] ).


3. Setting Environment

Add MAGICK_HOME to your environment PATH.

f:id:hrt0kmt:20150618021312p:plain


Try phpinfo();

f:id:hrt0kmt:20150618022640p:plain


4. convert image on CLI

>convert wizard: wizard.jpg
>convert wizard.jpg win:

f:id:hrt0kmt:20150527165806p:plain


But in this state, ImageMagick number of supported formats is 0 and ImageMagick supported formats is no value so you should do below.

  1. All *_.dll file in C:¥ImageMagick-6.9.1-Q16¥modules¥coders copy to C:¥xampp¥apache¥bin
  2. All *_.dll file in C:¥ImageMagick-6.9.1-Q16¥modules¥filters copy to C:¥xampp¥apache¥bin
  3. All *_.dll file in C:¥ImageMagick-6.9.1-Q16¥modules¥coders copy to C:¥ImageMagick-6.9.1-Q16
  4. All *_.dll file in C:¥ImageMagick-6.9.1-Q16¥modules¥filters copy to C:¥ImageMagick-6.9.1-Q16
  5. All *_.dll file in C:¥ImageMagick-6.9.1-Q16¥modules¥coders copy to C:¥Windows¥system
  6. All *_.dll file in C:¥ImageMagick-6.9.1-Q16¥modules¥filters copy to C:¥Windows¥system
  7. Restart Apache

f:id:hrt0kmt:20150728101456p:plain



Refer from:

http://www.kaasan.info/archives/272

http://refreshless.com/blog/imagick-pecl-imagemagick-windows

http://stackoverflow.com/questions/15279301/imagemagick-supported-formats-no-value

http://stackoverflow.com/questions/26139443/unable-to-work-on-imagemagick-properly-on-windows-xampp