Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180549 - dev-python/imaging-1.1.6 (PIL) does not handle big endian TIFFs correctly
Summary: dev-python/imaging-1.1.6 (PIL) does not handle big endian TIFFs correctly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL: http://mail.python.org/pipermail/imag...
Whiteboard:
Keywords:
Depends on:
Blocks: 182454
  Show dependency tree
 
Reported: 2007-06-01 14:05 UTC by Tamas Haraszti
Modified: 2009-03-20 18:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch of Zach Pincus (imaging-1.1.6-TIF.patch,10.29 KB, patch)
2007-06-01 14:08 UTC, Tamas Haraszti
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tamas Haraszti 2007-06-01 14:05:36 UTC
The PIL has an issue opening 16 bit TIFF files in big endian format.
Such files are common is scientific applications. 
I found the imaging-1.1.6 is affected.

I found a post from Zach Pincus in the URL cited above, containing a fair description and fix of the bug.

Reproducible: Always

Steps to Reproduce:
1.open any TIFFs with big endian data
2. check the pixel values or the image in show()
3.

Actual Results:  
One can find the bytes swapped from 16 bit big endian TIFF images.
Comment 1 Tamas Haraszti 2007-06-01 14:08:33 UTC
Created attachment 120871 [details, diff]
Patch of Zach Pincus

After a bit of tweaking, finally this patch from the python mailing list worked for me.
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2007-10-11 09:40:35 UTC
The attached patch isn't that good, includes whitespace changes.
Comment 3 Sébastien Fabbro (RETIRED) gentoo-dev 2009-03-20 18:53:17 UTC
Patch applied in imaging-1.1.6-r1. Thanks.