Page 1 of 1

Problem converting ICC profile

Posted: Fri Oct 30, 2009 11:44 am
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.

Re: Problem converting ICC profile

Posted: Fri Oct 30, 2009 12:14 pm
by xnview
Could you try with -cmyk_space

Re: Problem converting ICC profile

Posted: Fri Oct 30, 2009 2:16 pm
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 ?

Re: Problem converting ICC profile

Posted: Fri Oct 30, 2009 2:43 pm
by deejjjaaaa
aoudin wrote:
Is there any workaround ?
can't you just use photoshop ? you can automate that there

Re: Problem converting ICC profile

Posted: Fri Oct 30, 2009 3:05 pm
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.

Re: Problem converting ICC profile

Posted: Fri Oct 30, 2009 3:07 pm
by xnview
Could you send me the file to test?

Re: Problem converting ICC profile

Posted: Fri Oct 30, 2009 4:34 pm
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).