Opened 8 years ago

Closed 8 years ago

#716 closed defect (fixed)

Error reading TIFF volume with I;16S image mode

Reported by: alexritter09@… Owned by: Tom Goddard
Priority: major Milestone:
Component: Volume Data Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Reading a light microscopy map in 3D TIFF format with I;16S image mode. This is a known bug in Pillow, reported in 2015 but apparently never fixed.

https://github.com/python-pillow/Pillow/issues/1244

Change History (4)

comment:1 by Tom Goddard, 8 years ago

The following Pillow pull request attempted to fix the I;16S TIFF reading but apparently there are serious problems because Pillow does not have adequate support for signed color components, so this fix did not get accepted.

https://github.com/python-pillow/Pillow/pull/1388

comment:2 by Tom Goddard, 8 years ago

Pillow bug report about I;16S from 2014. Comments as of April 2017 don't offer any fix.

https://github.com/python-pillow/Pillow/issues/861

comment:3 by Tom Goddard, 8 years ago

I compiled Pillow from source code patching 4 files (Pack.c, Unpack.c, Access.c, Storage.c) to partially support the I;16S signed 16-bit pixel values. That allows ChimeraX to read the light microscopy data.

Still considering whether it is worth compiling our own version of the code to handle this obscure format. Also considering whether to make a pull request on the Pillow GitHub code repository to get this change into the main distribution. Probably should do both.

comment:4 by Tom Goddard, 8 years ago

Resolution: fixed
Status: assignedclosed

Added compilation of patched Pillow code to read 16-bit signed data.
Created Pillow pull request at github to get these changes merged into Pillow:

https://github.com/python-pillow/Pillow/pull/2577

Note: See TracTickets for help on using tickets.