Bugzilla – Bug 690178
1-bit CMYK PDF file not rendered correctly
Last modified: 2008-12-19 08:31:56 PST
The attached PDF file (which seems to be 1-bit CMYK according to its name) does
not render correctly with Ghostscript. Adobe Reader displays the file correctly.
See the attached screenshots.
Created attachment 4612 [details]
1-Bit CMYK PDF file
The PDF which does not render correctly
Created attachment 4613 [details]
Screen shot of file display with Adobe Reader
This is how the file should look like
Created attachment 4614 [details]
Screen shot of file display with Ghostscript
This is what Ghostscript makes out of the file
The PDF file contains an image, with a really unusual Decode array:
[0 1 1 0 0 0 0 0]
This eliminates Yellow and Black by mapping all values to 0, inverts Magenta,
and preserves Cyan.
The image is actually (sort of) monochrome. Each sample is either 0 (no inks) or
0xf (all inks, 1-bit per component, 4 components). The Decode array suppresses
the yellow and black components. Where the values are 0, cyan is preserved, and
therefore comes out 0, magenta is inverted, so comes out 100% magenta. Where the
image sample is 0xf the cyan is preserved (100%) and the magenta is inverted to 0%.
If I alter the values in the Decode array to a more normal [0 1 0 1 0 1 0 1]
then the image renders as expected, so it looks like its the odd Decode array
causing the problem. It seems to be the inversion of the samples, non inverting
Decode arrays all seem OK.
As Adobe Reader is capable of rendering this file, Ghostscript should be capable
of doing so, too.
Created attachment 4618 [details]
Check the whole Decode array to detect special cases of identity and
Regression testing shows no differences.
For me the sample file displays correctly after applying the patch.
The patch is committed as a rev. 9254.