Bug 693716 - CMYK to RGB conversion with color management does not work
Summary: CMYK to RGB conversion with color management does not work
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Color Management (show other bugs)
Version: 9.07
Hardware: PC Windows 7
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-19 22:43 UTC by Lino
Modified: 2013-03-20 08:07 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
source pdf (3.32 MB, application/pdf)
2013-03-19 22:43 UTC, Lino
Details
the resulting pdf (298.72 KB, application/pdf)
2013-03-19 22:45 UTC, Lino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lino 2013-03-19 22:43:40 UTC
Created attachment 9361 [details]
source pdf

Hello,

I used GS 8.7 with the -dUseCIEColor flag. For me that was the best cmyk to rgb output I could get for my PDFs. But the rgb PDFs never looked quite the way I wanted them. That's why I was happy to hear that there are new color management possibilities in GS9.

I tried to update to GS 9.07 but I keep getting the following message:
Unable to convert color space to sRGB, reverting strategy to LeaveColorUnchanged.

This is a simplification of my gs command:
gswin64c.exe -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \
-dColorConversionStrategyForImages=/sRGB \
-dColorConversionStrategy=/sRGB \
-dProcessColorModel=/DeviceRGB \
-sICCProfilesDir=./profiles/ -sDefaultRGBProfile=sRGB_IEC61966-2-1_no_black_scaling.icc \
-sDefaultCMYKProfile=UncoatedFOGRA29.icc \
-sOutputICCProfile=sRGB_IEC61966-2-1_no_black_scaling.icc \
-sImageICCProfile=sRGB_IEC61966-2-1_no_black_scaling.icc \
-sOutputFile="result.pdf" "sample.pdf"

The result then is not a RGB-PDF. For some reason the color conversion fails.

Thank you,
Lino
Comment 1 Lino 2013-03-19 22:45:01 UTC
Created attachment 9362 [details]
the resulting pdf

... also added the resulting PDF
Comment 2 Michael Vrhel 2013-03-19 23:15:47 UTC
Note, that with the pdfwrite device the ICC profiles are not yet used in the manner that you want.   Work is underway to make pdfwrite use the profiles.  I am passing this on to Ken in case he wants to make further comments.
Comment 3 Lino 2013-03-20 07:07:50 UTC
I understand that you are still working on making pdfwrite use the profiles and I'm really looking forward to that.

But I'm not able to convert the PDF to RGB at all in GS9.07.

The command that works for GS8.7 but not for GS9.07
gswin32c.exe -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \
-dUseCIEColor \
-dColorConversionStrategyForImages=/sRGB \
-dColorConversionStrategy=/sRGB  \
-dProcessColorModel=/DeviceRGB \
-sOutputFile="result.pdf" "sample.pdf"

While I get a RGB-PDF with lightly wrong colors in GS 8.7, GS9.07 brings "Unable to convert color space to sRGB, reverting strategy to LeaveColorUnchanged" and leaves everything in CMYK.

I would GS 9.07 expect to producethe same results as GS 8.7 when using -dUseCIEColor.
Comment 4 Ken Sharp 2013-03-20 08:07:38 UTC
(In reply to comment #3)
 
> But I'm not able to convert the PDF to RGB at all in GS9.07.

You haven't requested 'RGB' you have requested 'sRGB' which is a calibrated RGB space. By using -dUseCIEColor you have converted all the incoming colours into CIEBased spaces, and then attempt to convert the CIE colours into sRGB. There are situations in the current colour scheme where this simply can't be done. In fact the old code only converted Gray or RGB colour specifications into RGB, CMYK and CIEBased colours were left unchanged.

Note that as there is no 'ColorConversionStrategyForImages' switch this has no effect anyway. 

> The command that works for GS8.7 but not for GS9.07
> gswin32c.exe -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \
> -dUseCIEColor \
> -dColorConversionStrategyForImages=/sRGB \
> -dColorConversionStrategy=/sRGB  \
> -dProcessColorModel=/DeviceRGB \
> -sOutputFile="result.pdf" "sample.pdf"
> 
> While I get a RGB-PDF with lightly wrong colors in GS 8.7, GS9.07 brings
> "Unable to convert color space to sRGB, reverting strategy to
> LeaveColorUnchanged" and leaves everything in CMYK.
> 
> I would GS 9.07 expect to producethe same results as GS 8.7 when using
> -dUseCIEColor.

The pdfwrite device never did honour the conversion, and silently wrote a different (non-sRGB) colour space. The only difference from earlier versions is that it now tells you that its doing so, and reverts the strategy to 'LeaveColorUnchanged', so that at least it is consistent. It didn't work before, it doesn't work now, but you get told that it doesn't.

The previous behaviour of silently ignoring the colour conversion strategy is just one reason why this work is underway.

I'm resolving this as 'wontifx' because we won't fix the old colour management, but this will be resolved by the new colour management when it is complete.