Label on cmyk images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
robuntu
Posts: 41
Joined: 2012-01-22T10:56:10-07:00
Authentication code: 8675308

Label on cmyk images

Post by robuntu »

Hi,
I want to label a cmyk image with a label of any color.
When I try to label a dark image (with black spots) with a white label,
I get an unpleasant result because "white" is like "nothing" in cmyk and
black is like "all" in cmyk.
I tried labelling a new png with transparent background and composing the images.
When using -compose over I can not write white over black.
When using -compose copy I get a box around the label.

Is there a way of doing this as easy as it would be with RGB?

Greetings
Roland
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Label on cmyk images

Post by anthony »

Best way is convert the image to RGB, label it, and convert back.

IM by default uses 16 quality, which allows such conversions to work well, without loosing quality when applied to images that is read/written from 8 bit depth image file formats.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
robuntu
Posts: 41
Joined: 2012-01-22T10:56:10-07:00
Authentication code: 8675308

Re: Label on cmyk images

Post by robuntu »

Hi Anthony,
I have to deal with designers...
They have designed the image with photoshop in cmyk because the want to print it on a
cmyk-printer in extreme high quality.
I guess if I convert the colours twice the result will not satisfy the trained eyes of these experts...
Any other way without messing around with the colours?

Thanks anyway!

Roland
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Label on cmyk images

Post by anthony »

All I can say is get a CMYK image, convert it to RGB, convert it back, and save it to the same format. Now compare.

If the saved file format is 8bit I doubt you will see any difference. If there is then something is wrong in IM.
This assumes that you are using a Q16 version of IM (the default).

Whatever you do, do not save it using an intermedate image to a 8bit file format while it is in RGB mode! That will produce rounding errors though not very large ones. If you need to save in RGB mode use a 16 bit image file format.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply