Summary: | 1-bit CMYK PDF file not rendered correctly | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Till Kamppeter <till.kamppeter> |
Component: | PDF Interpreter | Assignee: | Alex Cherepanov <alex> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | 8.63 | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: |
1-Bit CMYK PDF file
Screen shot of file display with Adobe Reader Screen shot of file display with Ghostscript patch |
Description
Till Kamppeter
2008-11-21 01:46:07 UTC
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]
patch
Check the whole Decode array to detect special cases of identity and
inverse decoding.
Regression testing shows no differences.
For me the sample file displays correctly after applying the patch. The patch is committed as a rev. 9254. |