[Image-SIG] Re: silent corruption of FillOrder: lsb-to-msb TIFF reads?

Fredrik Lundh fredrik@pythonware.com
Mon, 19 May 2003 17:02:20 +0200


Jeff wrote:

> Looking at the output, I suspect that PIL's TIFF reader
> is ignoring the FillOrder tag. Even more suspicious, when I
> convert the TIFF to  FillOrder: msb-to-lsb, no such corruption
> occurs.

> TIFF Directory at offset 0x5c4e9ee
>   Image Width: 4913 Image Length: 6567
>   Resolution: 600, 600 pixels/inch
>   Bits/Sample: 8
>   Compression Scheme: None
>   Photometric Interpretation: RGB color
>   FillOrder: lsb-to-msb
>   Orientation: row 0 top, col 0 lhs
>   Samples/Pixel: 3

footnote: the TIFF 6.0 specification says:

    We recommend that FillOrder=2 [lsb-to-msb] be used only in special-
    purpose applications. It is easy and inexpensive for writers to reverse
    bit order by using a 256-byte lookup table. FillOrder = 2 should be
    used only when BitsPerSample = 1 and the data is either uncompressed
    or compressed using CCITT 1D or 2D compression, to avoid potentially
    ambigous situations.

    Support for FillOrder=2 is not required in a Baseline TIFF compliant
    reader.

so this file is pushing the envelope somewhat...

</F>