Drawing a CMYK Image

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
cyklop
Posts: 7
Joined: 2010-06-10T22:20:58-07:00
Authentication code: 8675308

Drawing a CMYK Image

Post by cyklop »

Hi,
I wonder if there is a way of drawing a cmyk Image.

Code: Select all

new ImagickPixel('cmyk(0,100,0,0)');


This will create a CMYK color, but if I use this color to draw a rectangle or anything else, and analyse this afterwards in Photoshop, the used color is a way different of what i setup at first.

Code: Select all

$image = new Imagick();
$image->newImage(100, 100, 'none');
$draw = new ImagickDraw();
$color = new ImagickPixel('cmyk(0,100,0,0)');
$draw->setFillColor($color );
$draw->rectangle( 0, 0, 100, 100 );
$image->drawImage( $draw );
$image->setImageFormat('tif');
$image->writeImage('test.tif');
Is there something wrong?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Drawing a CMYK Image

Post by magick »

Drawing is only supported in RGB. We're looking at CMYK support in ImageMagick version 7.
Post Reply