I'm trying to convert a RGB .gif to a CMYK .gif using IMagick PHP module.
I've wrote this piece of code
$i = new Imagick('mosaique.gif');
$i->setImageColorspace(Imagick::COLORSPACE_CMYK);
$i->setImageFormat('gif');
$i->writeImage('mosaique-cmyk.gif');
But the resultant "mosaique-cmyk.gif" still a RGB... but with inverted colors (O_O)
What am I doing wrong?
EDIT:
I've tried with a .jpg and the image is converted to CMYK but it stills in negative.
EDIT 2:
I've tried to run my script making a .pdf on another server and it works fine.
Are there any known bug in IMagick? Are there some options to set in the php5 library?
The version that returns me the inverted image is newer than the one that works correctly
WRONG RESULT PHP 5.3.3 IMagick 3.0.0RC1 ImageMagick 6.6.2
CORRECT RESULT PHP 5.2.10 IMagick 2.1.1 ImageMagick 6.5.1
The error in fact it's a bug ;)
I reported it, some other has confirmed my fear and now it's assigned to a developer for a fix: http://pecl.php.net/bugs/bug.php?id=22184
At this moment the solution it's to use a different version of the libraries.