0

I would like to know how to download the correct Imagemagick decode delegates from http://www.imagemagick.org/download/delegates/, as well what to do with them afterwards.

I'm using:

  • Imagick 3.4.3RC1, 6.9.3-7 Q16 x64 2016-03-27
  • PHP 5.6.25
  • WAMP 3.0.0.25 on Windows 7

I've been looking on Imagick and Stackoverflow threads, but the ones I found were mostly concerning errors with the delegates after they had them, and none of them used WAMP. Any help would be appreciated

A. Galloway
  • 135
  • 1
  • 10
  • Also, phpinfo() says under *imagick*: **ImageMagick number of supported formats: 0** – A. Galloway Jun 06 '17 at 22:32
  • I am surprised that an install of Imagick does not come with an install of ImageMagick with delegates. Can you not just install a Windows binary version of ImageMagick, which is compatible with your version of Imagick, so that it comes with all the delegates. See http://www.imagemagick.org/script/binary-releases.php#windows – fmw42 Jun 06 '17 at 22:39
  • I ran into issues with getting the latest version of Imagick to play nice with my system. Would I be able to theoretically copy the delegates from the newest binary and paste them into the right folder in my installation? – A. Galloway Jun 06 '17 at 22:42
  • 1
    Please download imagick + ImageMagick from http://windows.php.net/downloads/pecl/deps/ http://windows.php.net/downloads/pecl/releases/imagick/ "no supported formats" happens when you've download libraries from different places. – Danack Jun 06 '17 at 23:22
  • Why are you using a RC (Release Candidiate) version of Imagick. And RC1? When there is a RC2/RC3/RC4 as well. Use the actual release 3.4.3 Release candidates are basically Beta+ versions – RiggsFolly Jun 07 '17 at 22:20
  • Also did you download the Thread Safe version (TS) version. The NTS version wont work with WAMPServer – RiggsFolly Jun 07 '17 at 22:24
  • Also what is WAMPServer 3.0.0.25?? Do you mean WAMPServer 3 or 2.5? – RiggsFolly Jun 07 '17 at 22:25
  • Is your WAMPServer 32bit or 64bit – RiggsFolly Jun 07 '17 at 22:39
  • While this link is for php7 it's still relevant. Give it a good read and you should find your solution, https://herbmiller.me/2016/06/16/installing-imagick-php-7/ – mdo123 Jun 07 '17 at 23:31
  • @mdo123 Except for the current _Catch 22_ situation we are all currently in with the `imagick` not yet being available for running with `ImageMagick 7` as `imagick` has not yet been compiled against `ImageMagick 7` and that is the only version of `ImageMagick` available for download on their site. – RiggsFolly Jun 08 '17 at 11:06

1 Answers1

2

In the past this has worked by installing ImageMagick and then downloading a compatible imagick PHP extension.

But currently there seems to be a temporary "Catch 22" situation with ImageMagick and imagick.

imagick versions need to be compiled against a specific version of ImageMagick and currently that has not been done for imagick against the new ImageMagick 7 although I am informed by @danack that imagick is ready to be compiled but nobody has done so yet, or at least they have not shared the binary.

Unfortunately ImageMagick do not retain older versions of their install i.e. ImageMagick 6.? so if you dont already have a version of the installer the only availaible one is ImageMagick 7

The Catch 22

Therefore the only versions of imagick available will only work with ImageMagick 6 and you cannot download ImageMagick 6 as the ImageMagick people do not retain old version of their installer.

The work around

However, if you only want ImageMagick to work within a PHP/Apache environment this proceedure works.

The versions of the following must match your WAMPServer, so if you installed WAMPServer 32bit use the 32bit versions of ImageMagick and Imagick, if you use WAMPServer 64bit, use the 64bit versions of ImageMagick and Imagick. The VC14 versions should work with WAMPServers Apache 2.4.x versions

  1. Download ImageMagick-6.9.3-7-vc14-x86.zip (32bit) or ImageMagick-6.9.3-7-vc14-x64.zip (64bit) from http://windows.php.net/downloads/pecl/deps/ depending upon which WAMPServer version you are using i.e. 32bit or 64bit

  2. Download php_imagick-3.4.3-5.6-ts-vc11-x86.zip (32bit) or php_imagick-3.4.3-5.6-ts-vc11-x64.zip (64bit) from http://windows.php.net/downloads/pecl/releases/imagick/3.4.3/ depending upon which WAMPServer version you are using i.e. 32bit or 64bit

  3. Create a folder to hold ImageMagick, I used wamp\imagemagick

  4. Unzip whichever of the ImageMagick's you downloaded i.e. ImageMagick-6.9.3-7-vc14-x86.zip or ImageMagick-6.9.3-7-vc14-x64.zip into the wamp\imagemagick folder

  5. Unzip whichever of the imagick version you downloaded php_imagick-3.4.3-5.6-ts-vc11-x86.zip (32bit) or php_imagick-3.4.3-5.6-ts-vc11-x64.zip (64bit) into a temp folder and copy the php_imagick.dll from the temp folder to your wamp\bin\php\php5.6.25\ext folder

  6. Edit your 'php.inifile to add the extension. Use the wampmanager menus so you edit the correct file (left click) wampmanager->PHP->php.ini Add the lineextension=php_imagick.dllinto the section ofphp.inithat contains the otherextension` parameters.

  7. Add the folder to your windows PATH using Control Panel -> System -> Advanced System Setting Select the Advanced Tab Click the Environment Variables Button Add C:\wamp\imagick; to the PATH variable in the System Variables section [I dont like adding anything to the PATH for WAMPServer, but I cannot think of a better solution for now and as this way will work for multiple versions of PHP it is not actually so bad]

Start WAMPServer, or restart Apache. It may be necessary to reboot windows, it was for me, but maybe that was because I tried a number of things before I got to this solution.

Check with phpinfo() you should see enter image description here

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • "it appears that the imagick PHP extension is not yet compatible with the new ImageMagick" - it is. It just needs someone who cares about windows to compile it and possible share that binary with others. – Danack Jun 08 '17 at 01:21
  • @Danack Thanks for the info. So basically until it is compiled, it is not compatible right? – RiggsFolly Jun 08 '17 at 10:33
  • @Danack I have changed my description of the current situation. It was not my intent to be unpleasant to the maintainers of `imagick` as I know you are one or maybe the only one of those. – RiggsFolly Jun 08 '17 at 10:58
  • This was exactly what I needed. Thanks – A. Galloway Jun 08 '17 at 22:58
  • @RiggsFolly One thing though, if phpinfo() says my compiler is VC11, should I download `ImageMagick-6.9.3-7-vc14-x64.zip` or `ImageMagick-6.9.3-7-vc11-x64.zip`? Will it make any difference? (I have WAMP64) – A. Galloway Jun 08 '17 at 23:09
  • Then you download the `ImageMagick-6.9.3-7-vc11-x64.zip` – RiggsFolly Jun 09 '17 at 08:31