Problem converting ICC profile

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, xnview

aoudin
Posts: 10
Joined: Thu Oct 29, 2009 5:12 pm

Problem converting ICC profile

Post by aoudin »

I try to convert eps images that doesn't have ICC profile embedded and I have some troubles.

[*] I try to force profile conversion with these parameters :
nconvert.exe -out jpeg -ctype cmyk -icc -icc_in "C:\Program Files\Common Files\Adobe\Color\Profiles\Recommended\CoatedFOGRA27.icc" -icc_out "C:\Program Files\Common Files\Adobe\Color\Profiles\Recommended\sRGB Color Space Profile.icm" -o out_icc.jpeg image.eps

I keep having this error :

Code: Select all

ICC: Input profile is not operating in proper color space
I can't force the use of a cmyk color space because of the bug with the cmyk_cspace.

[*] FOGRA27 is a standardized cmyk profile (used by photoshop by default when a cmyk image doesn't have an ICC profile embeded)
In XNView, image properties says : "Modèle de couleur RGB". But when I open it with photoshop it says "CMYK". I'm sure about that the image is cmyk, it is used for book printing.

How can convert ICC profile with nconvert ?

I can send you the image I use if you want to test.
User avatar
xnview
Author of XnView
Posts: 36393
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Problem converting ICC profile

Post by xnview »

Could you try with -cmyk_space
Pierre.
aoudin
Posts: 10
Joined: Thu Oct 29, 2009 5:12 pm

Re: Problem converting ICC profile

Post by aoudin »

xnview wrote:Could you try with -cmyk_space
It doesn't work :

[*] cmyk icc profile to rgb icc profile doesn't work with multiple errors. Here is the command line :
nconvert.exe -out jpeg -ctype rgb -cmyk_space -icc_in "C:\Program Files\Common Files\Adobe\Color\Profiles\Recommended\CoatedFOGRA27.icc" -icc_out "C:\Program Files\Common Files\Adobe\Color\Profiles\Recommended\sRGB Color Space Profile.icm" -o out.jpeg image.eps
I have a warning for the out icc : ctype is rgb, profile is rgb, I don't know why there's an error - probably the cmyk_space option that forces nconvert to work in cmyk (so the ctype option is ignored ?).
The generated image is now completly black (but 2.7 Mo size...)

[*] I tried to convert image with multiple nconvert call. First call : convert from cmyk to cmyk with the same in / out icc. Second call : convert the generated cmyk file to rgb - but colors are totally wrong.

Is there any workaround ?
deejjjaaaa
Posts: 24
Joined: Tue Dec 23, 2008 8:48 pm

Re: Problem converting ICC profile

Post by deejjjaaaa »

aoudin wrote:
Is there any workaround ?
can't you just use photoshop ? you can automate that there
aoudin
Posts: 10
Joined: Thu Oct 29, 2009 5:12 pm

Re: Problem converting ICC profile

Post by aoudin »

no, it's not possible. We use nconvert because it's a command line program - so we can launch it with java / php / .Net...
Adobe's licence does not allow server side use of photoshop.
User avatar
xnview
Author of XnView
Posts: 36393
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Problem converting ICC profile

Post by xnview »

Could you send me the file to test?
Pierre.
aoudin
Posts: 10
Joined: Thu Oct 29, 2009 5:12 pm

Re: Problem converting ICC profile

Post by aoudin »

Thanks to Pierre, here is the good command-line options :

nconvert.exe -out jpeg -use_cie -keepcspace -icc_in "[PATH]\CoatedFOGRA27.icc" -icc_out "[PATH]\CoatedFOGRA27.icc" -o converted.jpeg source.eps

The option keepcspace tells nconvert to keep working in the "good" colorspace (for instance, if the icc profile is RGB, the RGB colorspace will be automatically used).