1

I've installed ImageMagick on my Mac and am trying to convert a TIFF image to a JPEG image using the PHP API that is provided by the ImageMagick extension. When I try to do that I get the following error:

no decode delegate for this image format 

When I do a convert image1.tiff image1.jpg on the command line it works.

For some reason the PHP extension for Imagick thinks the TIFF delegate is not installed when it clearly is. Why would I get different results and how could I fix this?

falsetru
  • 357,413
  • 63
  • 732
  • 636
planewalker
  • 298
  • 2
  • 12

2 Answers2

1

I found the solution. I had installed both ImageMagick and the PHP ImageMagick extension php53-imagick using Homebrew. When installing them this way you don't have many options in terms of configuration. php53-imagick was configured to use the Homebrew installation of ImageMagick.

What I did to solve the problem was download and compile the source of the Imagick PHP extension myself. The key configuration that you have to make is ./configure --with-imagick=/user/local or wherever your ImageMagic/wand folder is.

The imagick.so will appear in the modules directory and you'll need to add it to the php.ini

planewalker
  • 298
  • 2
  • 12
0

Coming from a different question: There's a more convenient solution in Homebrew with the command

brew install libtiff
brew install imagemagick --with-libtiff

(see Imagemagick can not find deletegates library for .tiff format on mac os x mountain lion for reference)

Paracetamol
  • 320
  • 3
  • 19