views:

266

answers:

2

Hi all,

When attempting to do a simple conversion from PHP, I receive this error :

exception 'ImagickException' with message 'wand contains no images `MagickWand-2' @ error/magick-image.c/MagickSetImageFilename/10080'

What is MagickWand doing there ?? I did not install it...

Here is my simple code :

  $a = "/[...]/test.jpg";
  $im = new Imagick();
  $im->pingImage($a);
  $im->readImage($a);               
  $im->setImageFormat("png");
  $im->writeImage("/[...]/output.png");

I checked the chmod of all folders... I suspect an 'incompatibility' between Imagick and ImageMagick? Here is my install details : - ImageMagick 6.6.2-8 - Imagick 2.3.0 - Php 5.2.3 - Ubuntu 7.10

If you have any clue pleeeeease! Thanx

Maz

A: 

Have tried with other image? And be sure that image are exists? This message say that your image doesn't exist.

fixo2020
thanx for the clue it made me try with a gif and it worked... So I knew it was from the jpeg + png library...
A: 

Well it came from my ImageMagick configuration - my sys lacked jpeg + png libraries

So basically:

sudo apt-get install libjpeg62-dev
sudo apt-get install libpng12-dev

// + rerun install of ImageMagick + iMagick
// + restart apache