[Image-SIG] silent corruption of FillOrder: lsb-to-msb TIFF reads?
K Schutte
schutte@fel.tno.nl
Sun, 18 May 2003 16:56:00 +0200
>From what I remember the same is valid for other not-one-char-per-pixel
TIFF file formats, including 16 and 32 bit integers. Thus, with PIL you
currently only can read your 'native' file format correctly.
Klamer
Jeff Breidenbach wrote:
> I'm getting unusual results when reading a set of TIFF files.
> PIL reads the file without complaint, but appears to be silently
> corrupting the image. The following commands save out a bunch of
> colorful noise.
>
> >>> import Image
> >>> a = Image.open("foo.tif")
> >>> a.save("bar.bmp")
>
> 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.
>
> Any comments? Ideally, I'd love for PIL to be able to read
> this type of TIFF file, or at least have a better grasp
> of its own limitations. I've attached the TIFF characteristics
> below.
>
> Cheers,
> Jeff
>
> 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
> Rows/Strip: 1
> Planar Configuration: single image plane
> Image: foo.tif
> Format: TIFF (Tagged Image File Format)
> Geometry: 4913x6567
> Class: DirectClass
> Type: true color
> Depth: 8 bits-per-pixel component
> Colors: 165833
> Resolution: 600x600 pixels/inch
> Filesize: 92.4m
> Interlace: None
> Background Color: grey100
> Border Color: #DFDFDF
> Matte Color: grey74
> Dispose: Undefined
> Iterations: 0
> Compression: None
>
>
> --
> Jeff Breidenbach <jbreiden "at" parc.com>
> Member of Research Staff, PARC
>
> _______________________________________________
> Image-SIG maillist - Image-SIG@python.org
> http://mail.python.org/mailman/listinfo/image-sig