Discussion:
CMYK and linux
Geert Janssens
2008-05-28 08:16:18 UTC
Permalink
I have what should be a simple question:
What program can I use under linux to see whether a picture is CMYK or RGB ?

I have a lot of images on my computer. Some of them are CMYK, some are RGB.
The problem is, I don't know which ones are what. My local photo lab seems to
be unable to reproduce CMYK images on paper (what an upside-down world eh ?)

So basically, I would like to open an image, and read in it's properties or
something whether it's CMYK or RGB.

I tried several programs, but until now haven't found one in which I can read
the colour space:
* Gimp, Cinepaint: they both seem to implicitly convert the image back to RGB
without a mention of CMYK
* Kuickshow, KView and Gwenview can display the images but don't provide
colorspace information
* Digikam en ShowFoto give me "Color mode unavailable"
* F-spot gives always RGB for tif images, and nothing for JPG's

So I don't know. Any suggestions ? Does one of the Argyll tools provide this
info ?

Thank you,

Geert
--
Kobalt W.I.T.
Web & Information Technology
Brusselsesteenweg 152
1850 Grimbergen

Tel : +32 479 339 655
Email: info-KqCdSXmn0hfheRZ+***@public.gmane.org
Lars Tore Gustavsen
2008-05-28 08:41:55 UTC
Permalink
Post by Geert Janssens
What program can I use under linux to see whether a picture is CMYK or RGB ?
I have a lot of images on my computer. Some of them are CMYK, some are RGB.
The problem is, I don't know which ones are what. My local photo lab seems to
be unable to reproduce CMYK images on paper (what an upside-down world eh ?)
So basically, I would like to open an image, and read in it's properties or
something whether it's CMYK or RGB.
A simple solution is imagemagick. Like this:
identify -format "%[colorspace]" filename

http://www.imagemagick.org/script/escape.php

Regards
Lars Tore Gustavsen
Andreas Schrell
2008-05-28 08:51:45 UTC
Permalink
Hm,

identify -verbose works and shows the colorspace, but %[colorspace] shows
nothing (blank line). I tried with

Version: ImageMagick 6.3.7 05/02/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

and

Version: ImageMagick 6.2.4 02/10/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2005 ImageMagick Studio LLC

on debian.

Andreas
Post by Lars Tore Gustavsen
Post by Geert Janssens
What program can I use under linux to see whether a picture is CMYK or RGB ?
I have a lot of images on my computer. Some of them are CMYK, some are RGB.
The problem is, I don't know which ones are what. My local photo lab seems to
be unable to reproduce CMYK images on paper (what an upside-down world eh ?)
So basically, I would like to open an image, and read in it's properties or
something whether it's CMYK or RGB.
identify -format "%[colorspace]" filename
http://www.imagemagick.org/script/escape.php
Regards
Lars Tore Gustavsen
Lars Tore Gustavsen
2008-05-28 09:22:50 UTC
Permalink
Post by Andreas Schrell
Hm,
identify -verbose works and shows the colorspace, but %[colorspace] shows
nothing (blank line). I tried with
Version: ImageMagick 6.3.7 05/02/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC
and
Version: ImageMagick 6.2.4 02/10/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2005 ImageMagick Studio LLC
on debian.
hm
Version: ImageMagick 6.4.0 03/25/08 Q16
ubuntu hardy

What about
identify -format %r filename

Lars Tore
Andreas Schrell
2008-05-28 09:28:02 UTC
Permalink
Lars Tore,

that gives

DirectClassRGB

Have no CMYK to check..

Andreas
Post by Lars Tore Gustavsen
Post by Andreas Schrell
Hm,
identify -verbose works and shows the colorspace, but %[colorspace] shows
nothing (blank line). I tried with
Version: ImageMagick 6.3.7 05/02/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC
and
Version: ImageMagick 6.2.4 02/10/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2005 ImageMagick Studio LLC
on debian.
hm
Version: ImageMagick 6.4.0 03/25/08 Q16
ubuntu hardy
What about
identify -format %r filename
Lars Tore
Geert Janssens
2008-05-28 09:24:31 UTC
Permalink
Found it on the ImageMagick documentation website:
http://www.imagemagick.org/script/escape.php

%r image class and colorspace

So the command should be:
identify -format "%r" <imagename>

Thanks for the hint !

Any chance there is also a gui app that can show this ? Sometimes I would like
to see this info while looking at the image.

Geert
Post by Andreas Schrell
Hm,
identify -verbose works and shows the colorspace, but %[colorspace] shows
nothing (blank line). I tried with
Version: ImageMagick 6.3.7 05/02/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC
and
Version: ImageMagick 6.2.4 02/10/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2005 ImageMagick Studio LLC
on debian.
Andreas
Post by Lars Tore Gustavsen
Post by Geert Janssens
What program can I use under linux to see whether a picture is CMYK or RGB ?
I have a lot of images on my computer. Some of them are CMYK, some are
RGB. The problem is, I don't know which ones are what. My local photo
lab seems to
be unable to reproduce CMYK images on paper (what an upside-down world eh ?)
So basically, I would like to open an image, and read in it's properties
or something whether it's CMYK or RGB.
identify -format "%[colorspace]" filename
http://www.imagemagick.org/script/escape.php
Regards
Lars Tore Gustavsen
--
Kobalt W.I.T.
Web & Information Technology
Brusselsesteenweg 152
1850 Grimbergen

Tel : +32 479 339 655
Email: info-KqCdSXmn0hfheRZ+***@public.gmane.org
Guy K. Kloss
2008-05-28 10:04:40 UTC
Permalink
Post by Geert Janssens
Any chance there is also a gui app that can show this ? Sometimes I would
like to see this info while looking at the image.
Click on an image being displayed with ImageMagick's "display" with the left
mouse button, and you get a menu. On the menu go to Miscellany -> Image Info.
I'd expect that info to show up in the upcoming info dialogue as well.

Guy
--
Guy K. Kloss
Institute of Information and Mathematical Sciences
Te Kura Putaiao o Mohiohio me Pangarau
Room 2.63, Quad Block A Building
Massey University, Auckland, Albany
Private Bag 102 904, North Shore Mail Centre
voice: +64 9 414-0800 ext. 9585   fax: +64 9 441-8181
eMail: G.Kloss-GuuZuZYZZ9vScTE++***@public.gmane.org  http://iims.massey.ac.nz
Klaus Karcher
2008-05-28 09:10:42 UTC
Permalink
Post by Lars Tore Gustavsen
Post by Geert Janssens
What program can I use under linux to see whether a picture is CMYK or RGB ?
identify -format "%[colorspace]" filename
another option for tiffs is tiffinfo (part of libtiff)

e.g.
tiffinfo input.tif | grep "Photometric Interpretation:"

returns
" Photometric Interpretation: RGB color"
for RGB images and
" Photometric Interpretation: separated"
for CMYK images

Klaus
Kai-Uwe Behrmann
2008-05-28 09:20:09 UTC
Permalink
Post by Geert Janssens
* Gimp, Cinepaint: they both seem to implicitly convert the image back to RGB
without a mention of CMYK
CinePaint may convert depending on the input format and the colour
management policy in the Oyranos configuration panel.

<toolbox> -> File -> Preferences... -> Colour Management ->[Oyranos Config]
Try to choose Photographer or look at the individual behaviour options.

I'd expect CinePaint version 0.22-1 compiled with Oyranos to work as
described above, which an exception for Tiff.


kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
Geert Janssens
2008-05-28 09:31:07 UTC
Permalink
There is nothing like "Oyranos" in my Cinepaint preferences.

Cinepaint is v0.22-1 on Mandriva 2008.0.

Is this something I should install separatly ? I can't find any Mandriva
package that would refer to oyranos.

Regards,

Geert
Post by Kai-Uwe Behrmann
Post by Geert Janssens
* Gimp, Cinepaint: they both seem to implicitly convert the image back to
RGB without a mention of CMYK
CinePaint may convert depending on the input format and the colour
management policy in the Oyranos configuration panel.
<toolbox> -> File -> Preferences... -> Colour Management ->[Oyranos Config]
Try to choose Photographer or look at the individual behaviour options.
I'd expect CinePaint version 0.22-1 compiled with Oyranos to work as
described above, which an exception for Tiff.
kind regards
Kai-Uwe Behrmann
--
Kobalt W.I.T.
Web & Information Technology
Brusselsesteenweg 152
1850 Grimbergen

Tel : +32 479 339 655
Email: info-KqCdSXmn0hfheRZ+***@public.gmane.org
Kai-Uwe Behrmann
2008-05-28 09:55:22 UTC
Permalink
Oyranos support would require a different compile.
You might check the mentioned configuration tab to enshure that the lower
"Default Behaviour" frame buttons are set to promt to get most control
about the process or set at least "Keep Image Profile".

kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
Post by Geert Janssens
There is nothing like "Oyranos" in my Cinepaint preferences.
Cinepaint is v0.22-1 on Mandriva 2008.0.
Is this something I should install separatly ? I can't find any Mandriva
package that would refer to oyranos.
Regards,
Geert
Post by Kai-Uwe Behrmann
Post by Geert Janssens
* Gimp, Cinepaint: they both seem to implicitly convert the image back to
RGB without a mention of CMYK
CinePaint may convert depending on the input format and the colour
management policy in the Oyranos configuration panel.
<toolbox> -> File -> Preferences... -> Colour Management ->[Oyranos Config]
Try to choose Photographer or look at the individual behaviour options.
I'd expect CinePaint version 0.22-1 compiled with Oyranos to work as
described above, which an exception for Tiff.
kind regards
Kai-Uwe Behrmann
Geert Janssens
2008-05-28 10:09:09 UTC
Permalink
Ah, ok. I won't have time for a different compile right now. I hope I can try
that later.

But I see now that Cinepaint does preserve CMYK. The channels panel displays
Cyan, Magenta, Yellow, Black for a CMYK image. Gimp does not. So that is
already something.

However, my version of Cinepaint incorrectly displays the CMYK image. It seems
to me as if it uses the CMYK channels as if they were RGBA. The image has
really weird colors, and a lot of it is transparent (Black channel
interpreted as alpha ?).

Is this normal behaviour for the default Cinepaint application ? And this is
not in the oyranos edition ?

Regards,

Geert
Post by Kai-Uwe Behrmann
Oyranos support would require a different compile.
You might check the mentioned configuration tab to enshure that the lower
"Default Behaviour" frame buttons are set to promt to get most control
about the process or set at least "Keep Image Profile".
kind regards
Kai-Uwe Behrmann
--
Kobalt W.I.T.
Web & Information Technology
Brusselsesteenweg 152
1850 Grimbergen

Tel : +32 479 339 655
Email: info-KqCdSXmn0hfheRZ+***@public.gmane.org
Kai-Uwe Behrmann
2008-05-28 11:04:33 UTC
Permalink
No need to recompile with Oyranos as long as the Cmyk profile and a
monitor or sRGB profile is reachable from your ICC-Profile paths
configured in CinePaint's preferences. Below you can find a screenshot on
the CinePaint CM page, to show you most of the relevant options:
http://www.oyranos.org/wiki/index.php?title=CinePaint#Screenshots

Oyranos profile RPM's can be found here:
http://www.behrmann.name/index.php?option=com_content&task=view&id=34&Itemid=68#profiles


kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
Post by Geert Janssens
Ah, ok. I won't have time for a different compile right now. I hope I can try
that later.
Peter Smyth
2008-05-28 11:09:30 UTC
Permalink
Krita should preserve the colour space of the image and will also give
you a way to find out what it is. It's still under heavy development
and the old stable version is missing some features but I much prefer
it to the Gimp.

Cheers

Peter.
Post by Kai-Uwe Behrmann
No need to recompile with Oyranos as long as the Cmyk profile and a
monitor or sRGB profile is reachable from your ICC-Profile paths
configured in CinePaint's preferences. Below you can find a screenshot on
http://www.oyranos.org/wiki/index.php?title=CinePaint#Screenshots
http://www.behrmann.name/index.php?option=com_content&task=view&id=34&Itemid=68#profiles
kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
Post by Geert Janssens
Ah, ok. I won't have time for a different compile right now. I hope I can try
that later.
Frédéric Mantegazza
2008-05-28 10:51:39 UTC
Permalink
Post by Geert Janssens
What program can I use under linux to see whether a picture is CMYK or RGB ?
Geeqie, the gqview fork, has a full support for profiles. Just open the
exif viewer (Ctrl-E) and you'll see what profile is embedded (as long as
there *is* an embedded profile).
--
Frédéric

http://www.gbiloba.org
Kai-Uwe Behrmann
2008-05-28 11:14:33 UTC
Permalink
Does "full support for profiles" mean loading and preserving or as well
display correction? (The later seems not to work for me, unfortunedly.)

kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
Post by Frédéric Mantegazza
Geeqie, the gqview fork, has a full support for profiles. Just open the
exif viewer (Ctrl-E) and you'll see what profile is embedded (as long as
there *is* an embedded profile).
Frédéric Mantegazza
2008-05-28 14:23:20 UTC
Permalink
Post by Kai-Uwe Behrmann
Does "full support for profiles" mean loading and preserving or as well
display correction? (The later seems not to work for me, unfortunedly.)
Geeqie is mainly a viewer, so it does not modify anything. AFAIK, all image
modification tools are external, so it depends which one you are using...

It loads profiles and display image correctly. It first tries to read the
embedded profile, then read exif tag, then does nothing. It is also
possible to manualy force another profile.

I plan to write some little scripts in order to add usefull color
management tools, like convert to another color space, assign profile...

PS : to enable color management, you need to click on the little icon, at
the bottom right, in the statusbar; you'll see a pull-up menu, with all
color options.
--
Frédéric

http://www.gbiloba.org
Kai-Uwe Behrmann
2008-05-28 15:10:58 UTC
Permalink
Post by Frédéric Mantegazza
Post by Kai-Uwe Behrmann
display correction? (The later seems not to work for me, unfortunedly.)
PS : to enable color management, you need to click on the little icon, at
the bottom right, in the statusbar; you'll see a pull-up menu, with all
color options.
The icon does the trick. Thanks for letting us know ;-)
Would love to see Cmyk being supported as well.

kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
Loading...