Bug 693074 - Using /sProcessColorModel=DeviceGray & -dColorConversionStrategy=/Gray doesn't convert all images to Gray
Summary: Using /sProcessColorModel=DeviceGray & -dColorConversionStrategy=/Gray doesn'...
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: master
Hardware: PC Windows 7
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-29 10:01 UTC by Kilobajt
Modified: 2012-05-29 19:34 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kilobajt 2012-05-29 10:01:31 UTC
Using /sProcessColorModel=DeviceGray & -dColorConversionStrategy=/Gray doesn't convert all images to Gray anymore. This worked in 9.05. Result are invalid PDF/A-1b files. Sample PDF file is available here: (17mb)
http://www.esrf.fr/files/Highlights/HL2006.pdf
Comment 1 Ken Sharp 2012-05-29 14:53:36 UTC
(In reply to comment #0)
> Using /sProcessColorModel=DeviceGray & -dColorConversionStrategy=/Gray doesn't
> convert all images to Gray anymore. This worked in 9.05. Result are invalid
> PDF/A-1b files. Sample PDF file is available here: (17mb)
> http://www.esrf.fr/files/Highlights/HL2006.pdf

This is a 129 page PDF file, don't you have anything smaller ?
Comment 2 Kilobajt 2012-05-29 15:44:02 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Using /sProcessColorModel=DeviceGray & -dColorConversionStrategy=/Gray doesn't
> > convert all images to Gray anymore. This worked in 9.05. Result are invalid
> > PDF/A-1b files. Sample PDF file is available here: (17mb)
> > http://www.esrf.fr/files/Highlights/HL2006.pdf
> 
> This is a 129 page PDF file, don't you have anything smaller ?

I'll try to find something smaller. If this is any help: Ghostscript stops converting to gray at page 98 (1-97 are all in gray) so the last 32 pages stay in color.
Comment 3 Ken Sharp 2012-05-29 16:13:43 UTC
(In reply to comment #2)

> I'll try to find something smaller. If this is any help: Ghostscript stops
> converting to gray at page 98 (1-97 are all in gray) so the last 32 pages stay
> in color.

I extracted page 98 and ran that, GS gives the following warning:

Unable to convert color space to Gray, reverting to LeaveColorUnchanged.

Documented values for ColorConversionStrategy are; LeaveColorUnchanged, sRGB and DeviceIndependentColor.

The warning is new, its to prevent a seg fault. Since 'Gray' is not a documented legal value for ColorConversionStrategy I'm inclined to feel this isn't a bug....

Note that the distiller parameter documentation does not list 'Gray' as a legal value either.

I'll bear this in mind when we revisit the colour code in pdfwrite however.
Comment 4 James Cloos 2012-05-29 19:27:37 UTC
Perhaps there is a way to use one of the gray profiles (default_gray, ps_gray or sgray) as an OutputIntent to do what the OP wants?
Comment 5 Ken Sharp 2012-05-29 19:34:29 UTC
(In reply to comment #4)
> Perhaps there is a way to use one of the gray profiles (default_gray, ps_gray
> or sgray) as an OutputIntent to do what the OP wants?

I don't think so, but you are welcome to prove me wrong.