Page 1 of 1

cmyk color definitions for draw do not work

Posted: 2008-05-15T05:49:25-07:00
by toolpark
convert -colorSpace CMYK -size 100x100 xc:"cmyk(0,255,255,0)" -fill "cmyk(255,0,0,0)" -draw "Rectangle 10,10 90,90" result.tif

This should result in a red square with a cyan square inside of it. What happens is, that the red square (canvas) is correct, but the cyan square is also red because the -fill color is interpreted as rgba, which also adds an alpha channel to the result.tif.

Im running this on a suse linux box with ImageMagick 6.4.1 05/04/08 Q16.

Thanks for your help,
Chris

Re: cmyk color definitions for draw do not work

Posted: 2008-05-15T06:29:39-07:00
by magick
Right. The rendering engine only works in the sRGB colorspace.

Re: cmyk color definitions for draw do not work

Posted: 2008-05-15T07:33:51-07:00
by toolpark
Thanks for the very fast answer. I do think the manual should be changed in that case. It states the following:

-fill color

color to use when filling a graphic primitive.

This option accepts a color name, a hex color, or a numerical RGB, RGBA, HSL, HSLA, CMYK, or CMYKA specification. See Color Names for a description of how to properly specify the color argument.

This clearly implies that you can fill with CMYK.

Re: cmyk color definitions for draw do not work

Posted: 2008-05-15T08:58:42-07:00
by magick
We could always clarify, however, -fill is used for other processes other than drawing and annotation. The other processes can accept a CMYK color specification.

Re: cmyk color definitions for draw do not work

Posted: 2008-05-15T12:51:41-07:00
by toolpark
Thanks for the info. Maybe if you have time you could add this information to the manual. I want to thank you for the great work and the very fast answers.