Regarding color conversion (RGB->CMYK)

  • Thread starter Johan Holst Nielsen
  • Start date
J

Johan Holst Nielsen

Hi all,

I hope someone can help me.

I have do do a color conversion from RGB to CMYK. It's harder than I
thought :D Anyway, here is my problem.

I tried some differents ways to do it - I have a TIFF RGB file that I
need to convert to CMYK colorspace.

First of all I tried ImageMagick - it works - or it doesn't. Its give me
an CMYK TIFF - but with way wrong colors :( Nothing seems to be quite
right in that picture - tried google - and it seems that other people
have the same problem as me :(

After that my thoughts was on PIL (Python Imaging Library). The colors
was better - but to bright - cause it didn't include K (so it was
basicly a RGB=>CMY conversion - Black is 100% Cyan, Magenta and Yellow).
I tried some googling - and again - some people said that PIL shouldn't
be used for images that should be printed "professional".

Now, I don't have any clue about what I need to do? Is there another way
to solve my problems? Any tools that can convert somehow? Or any kind of
examples I can try to read?

It have to run on a Linux box - Python, Perl, PHP, bash whatever :(

Though about GIMP - but can find any information about how I can do a
conversion in command-line? Any one having knowlegde about this?

Looking forward to hear from you and I will appreciate any kind of help.

With Best Regards,
Johan Holst Nielsen
 
S

Scott David Daniels

Johan said:
After that my thoughts was on PIL (Python Imaging Library). The colors
was better - but to bright - cause it didn't include K (so it was
basicly a RGB=>CMY conversion - Black is 100% Cyan, Magenta and Yellow).
Then make a K layer:
K = min(C,M,Y)
and reset C, M, Y = C-K, M-K, Y-K
 
M

M.E.Farmer

Johan Holst Nielsen said:
Hi all,

I hope someone can help me.

I have do do a color conversion from RGB to CMYK. It's harder than I
thought :D Anyway, here is my problem.
[snip]
After that my thoughts was on PIL (Python Imaging Library). The colors
was better - but to bright - cause it didn't include K (so it was
basicly a RGB=>CMY conversion - Black is 100% Cyan, Magenta and Yellow).
I tried some googling - and again - some people said that PIL shouldn't
be used for images that should be printed "professional".
This link might be a start.
'http://mail.python.org/pipermail/image-sig/2001-March/001386.html'
Basically you are right the conversion is not straightforward and is
somewhat error prone. Most of the time you have to tweak the colors,
especially the deep blues. It is somewhat unavoidable when you map a
additive colorsystem to a subtractive colorsystem. Maybe others might
have a commandline hack for you.

HTH,
M.E.Farmer
 
C

Cy Edmunds

Johan Holst Nielsen said:
Hi all,

I hope someone can help me.

I have do do a color conversion from RGB to CMYK. It's harder than I
thought :D Anyway, here is my problem.

I tried some differents ways to do it - I have a TIFF RGB file that I need
to convert to CMYK colorspace.

First of all I tried ImageMagick - it works - or it doesn't. Its give me
an CMYK TIFF - but with way wrong colors :( Nothing seems to be quite
right in that picture - tried google - and it seems that other people have
the same problem as me :(

After that my thoughts was on PIL (Python Imaging Library). The colors was
better - but to bright - cause it didn't include K (so it was basicly a
RGB=>CMY conversion - Black is 100% Cyan, Magenta and Yellow).
I tried some googling - and again - some people said that PIL shouldn't be
used for images that should be printed "professional".

Now, I don't have any clue about what I need to do? Is there another way
to solve my problems? Any tools that can convert somehow? Or any kind of
examples I can try to read?

It have to run on a Linux box - Python, Perl, PHP, bash whatever :(

Though about GIMP - but can find any information about how I can do a
conversion in command-line? Any one having knowlegde about this?

Looking forward to hear from you and I will appreciate any kind of help.

With Best Regards,
Johan Holst Nielsen

There is no simple way to convert RGB to CMYK for the simple reason that
CMYK is a device dependent color space. (Actually, unless it is calibrated
somehow RGB is a device dependent color space also.) A good way to do the
conversion is to get the ICC profile for the device that made the RGB and
another ICC profile for the device which will print the CMYK and convert one
to the other using a color management module -- aka a CMM. I don't know if
ImageMagick can do this for you or not but it would be very hard to get the
colors right any other way.
 
R

Robert Kern

Cy said:
There is no simple way to convert RGB to CMYK for the simple reason that
CMYK is a device dependent color space. (Actually, unless it is calibrated
somehow RGB is a device dependent color space also.) A good way to do the
conversion is to get the ICC profile for the device that made the RGB and
another ICC profile for the device which will print the CMYK and convert one
to the other using a color management module -- aka a CMM. I don't know if
ImageMagick can do this for you or not but it would be very hard to get the
colors right any other way.

LittleCMS has Python bindings.

http://www.littlecms.com/

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top