[Image-SIG] Adding endianess support in PIL
Pierre Barbier de Reuille
Pierre.Barbier_de_Reuille at inria.fr
Mon Sep 25 05:47:18 CEST 2006
First, AFAIK, there is no endianess support in PIL. But if there is,
please tell me and forget about this mail.
The problem in dealing with >8bits per channel images is the endianess
become important. However, there is, for now, no way of knowing the
endianess (unless you know a way specific to the format, as in the TIFF
tags). So I propose to add a "byteorder" attribute (similar to the NumPy
one) with the following values : '|' for "doesn't matter" (i.e. 8 bits
per channel or less), '>' for "big endian" and '<' for "little endian".
These values are taken from the NumPy lib. I don't know PIL enough to
propose a patch or anything, but this would be, IMHO, a useful and quite
easy addition to PIL.
More information about the Image-SIG