cmyk - rgb - cmyk

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

cmyk - rgb - cmyk

Post by robuntu »

Hi Anthony
I placed this question into this new Topic,
even though we diskussed it before somewhere else...
You posted:
With a Q16 version of IM, that should not be a problem! The Q16 provides enough leeway that colors that map from CYMK to RGB (or sRGB) and back should remain exact enough that their is no loss at the 8 bit level.
I did:

Code: Select all

convert picmyk.tiff -colorspace RGB picrgb.mpc
You say IM uses Q16 for color conversion. Does this mean identify imrgb.mpc should say 16bit now?
Because it doesn't:
picrgb.mpc MPC 17953x13465 17953x13465+0+0 8-bit DirectClass 508MB 0.780u 0:02.829
Or does it mean the conversion is done with 16bit but the image is still 8bit?

Greetings
Roland
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: cmyk - rgb - cmyk

Post by fmw42 »

I believe it is the latter. Internally precision is 32-bits, but the image format will stay the same unless you specify -depth (to reduce depth), but I think IM will not increase depth. But you can test that. It may depend upon the image format.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: cmyk - rgb - cmyk

Post by anthony »

MPC is a memory dump image file format. It uses internal quality and ignores depth completely.
Basically a MPC is an unprocessed 'dump' that can be directly memory mapped back in without any format processing on either the save or the read.
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: cmyk - rgb - cmyk

Post by robuntu »

Hi again,
I am happy with using RGB now!

I still have to deal with the designers thinking in CMYK only.
For example they want to set the label-color of an added textline to a cmyk-value.

Can I set the label color to a cmyk-value even in an RGB image?
Most important ist, that after remapping it to CMYK in the last step
of my work process the new color has the right cmyk values.
They will double check this with photoshop.

Greetings
Roland
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: cmyk - rgb - cmyk

Post by fmw42 »

I am not an expert on this, but I don't think you can add text to an image in cmyk colors. You may need to convert them first to rgb values and then add the text. But you can certainly just experiment.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: cmyk - rgb - cmyk

Post by anthony »

The Draw function at this time is RGBA only. It was developed when CMYK wasn't even posible.

IMv7 may be able to use draw in CMYK, not certain, though it may be some time before it gets looked at.

Simerlay you can specify colors in CMYK, and in IMv6 they should be drawn (though for now I would use sRGB for draw).
IMv7 will have better mapping between colors and that current colorspace of the image.

Basically try it, see if it works, and let us know.

Can you give an example of a CMYK color specification?
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: cmyk - rgb - cmyk

Post by robuntu »

Hi, it's me again.

Ich managed to solve lots of problems with the cmyk colors.
croping, cutting, appending works well now.

But I still have to add text to a cmyk image.
because the drawing on cmyk does not work propertly,
i convert teh image to rgb, add the text and convert back.
The results are inaceptable.
Image

Is there a way to store the cmyk-rgb colormap to use it backwards for the rgb-cmyk remapping?
Or can I use a transparent png file to drwat und write onto, convert this to cmyk
and combine these two cmyk images to one without double color converting.

I am really just before finishing my work, this is the last problem.
Greetings
Roland
robuntu
Posts: 41
Joined: 2012-01-22T10:56:10-07:00
Authentication code: 8675308

Re: cmyk - rgb - cmyk

Post by robuntu »

Ok, it seems I got a workaround.

I leave the original cmyk.tif file and create a new rgb.png with transparent background with the same dimensions.
I do all my drawings and compostings and labelings there.
then I convert this rgb.png to a cmyk-label.tif.
and then i do a composite cmyk-label.tif cmyk.tif out.tif

Can you confirm this workaround as a working option?
If yes, I would call the promlem as "almost solved"

Greetings
Roland
Post Reply