Summary: | Regression: input monochrome PostScript generates RGB PDF file | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Marcos H. Woehrmann <marcos.woehrmann> |
Component: | Color | Assignee: | Ken Sharp <ken.sharp> |
Status: | NOTIFIED INVALID | ||
Severity: | normal | CC: | alex, jackie.rosen |
Priority: | P2 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | 32 | Word Size: | --- |
Attachments: |
monochrome.ps
monochrome.pdf |
Description
Marcos H. Woehrmann
2012-04-10 17:23:08 UTC
Created attachment 8522 [details]
monochrome.ps
Ken suggests that the input file is at fault: From the setdistillerparams at the start of the file: /ColorConversionStrategy /sRGB Created attachment 8527 [details]
monochrome.pdf
If I run the monochrome.ps file through distiller the resultant pdf file (attached) is monochrome, as shown by gs with -dPDFDEBUG:
/BitsPerComponent 1 /ColorSpace /DeviceGray /DecodeParms
The customer reports: I tried removing /ColorConversionStrategy /sRGB and the file is still coming out in RGB. The file applies <</ColorConversionStrategy /sRGB>> twice. Both instances should be removed to get DeviceGray color space. Ghostscript handles ColorConversionStrategy differently than distiller. See the Acrobat Distiller Parameters spec for details. (In reply to comment #5) > The file applies <</ColorConversionStrategy /sRGB>> twice. > Both instances should be removed to get DeviceGray color space. > > Ghostscript handles ColorConversionStrategy differently than distiller. > See the Acrobat Distiller Parameters spec for details. As Alex correctly says the file sets ColorConversionStrategy (amongst other things) *twice*. You need to remove them both. If you do this then the default is used, which is /LeaveColorUnchanged. As Alex also points out our implementation of this parameter differs from the Acrobat implementation. The Distiller implementation does not make sense to me, it leaves Gray objects in Gray space, despite the fact that the ColorConversionStrategy descibes the setting as 'Convert All Colors to sRGB'. Clearly this is not true, since it does not convert Gray. Our implementation does what it says, it converts all colours to the specified space. Note that our default value also differs from teh Distiller default of sRGB. We don't support maintaining objects in DeviceGray while converting objects in other colour spaces. If the customer wants to maintain Gray objects in DeviceGray space, they need to leave 'ColorConversionStrategy' set to /LeaveColorUnchanged. |