[Openicc] cups-filters

Till Kamppeter till.kamppeter at gmail.com
Fri May 16 13:39:59 PDT 2014


On 05/15/2014 08:39 PM, James Cloos wrote:
> TK> Also 16 bit color depth with Black and RGB gives broken output.
> 
> Might there be an endian issue?  PDF is big-endian.  The raster file's
> endianness is specified by its 1st 32 bits, 't','S','a','R' for little-
> or 'R','a','S','t' for big-endian.  (The pwg raster spec seems to have
> lost mention of that; the cups raster spec retains that detail.)

I have done more investigations on 16-bit Raster files and swapping each
pair of two bytes in the bitmap (switching endianess) makes the PDF
coming out correctly. This means something is Little Endian here, either
Ghostscript's PWG Raster output (I have fixed Ghostscript to use the
correct cupsRasterOpen so that I get "Ras2" files), or there is an
Enidan switching somewhere in QPDF (CCing Jay from QPDF).

As there is no consumer of 16-bit Raster (printer drivers usually take
8-bit or 1-bit per color) there was not much testing whether the
renderers (Poppler, Ghostscript) produce correct 16-bit CUPS/PWG Raster
output. So it is perhaps possible that the output is Little Endian and
not Big Endian as it should.

Note also that I could only test with Ghostscript output, as I did not
yet succeed to make the Poppler-based pdftoraster produce PWG Raster output.

   Till



More information about the openicc mailing list