cmyk color definitions for draw do not work

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
toolpark

cmyk color definitions for draw do not work

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: cmyk color definitions for draw do not work

Post by magick »

Right. The rendering engine only works in the sRGB colorspace.
toolpark

Re: cmyk color definitions for draw do not work

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: cmyk color definitions for draw do not work

Post 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.
toolpark

Re: cmyk color definitions for draw do not work

Post 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.
Post Reply