-
Pillow currently supports "band interleaved by pixel" and "band interleaved by line" image data (to an extent). Should it also support "band sequential"? Supporting only one layout would be the easiest, but if someone wants to use their image data with some other library they might want it to be in a specific layout. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I think Pillow already does. Here is a snippet from SgiImagePlugin, where one channel is loaded after another into the final image. Pillow/src/PIL/SgiImagePlugin.py Lines 114 to 118 in c924fd8 |
Beta Was this translation helpful? Give feedback.
-
The interleaved data I had remembered seeing is actually in the unpacking code: Pillow/src/libImaging/Unpack.c Lines 415 to 435 in d72779a So after the data is unpacked, it is being stored as "band interleaved by pixel", not "band interleaved by line". So this isn't an issue; all image data is being stored the same after decoding/unpacking. |
Beta Was this translation helpful? Give feedback.
The interleaved data I had remembered seeing is actually in the unpacking code:
Pillow/src/libImaging/Unpack.c
Lines 415 to 435 in d72779a