You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose to add a new unpacker to Unpack.c that can unpack big-endian 16-bit integer pixels (I;16B) into 16-bit integer pixels (I;16, I assume native or does it mean little-endian?).
At the moment, the following conversions are supported:
{"I;16", "I;12", 12, unpackI12_I16}, // 12 bit Tiffs stored in 16bits.
and it would be really useful for me to also have I;16B->I;16 as well.
My use case is 16-bit PNGs, which I could then directly unpack into a 16-bit buffer. Currently, we can only unpack them into a 32-bit (I) buffer or a 16-bit big-endian buffer (I;16B), so I have to copy the data one more time from that buffer into I;16. With this small addition I could avoid/save this copy :)
The text was updated successfully, but these errors were encountered:
FirefoxMetzger
changed the title
Add unpackI16B_I16 unpacker to unpackers
Add the unpackI16B_I16 unpacker to unpackers
Apr 29, 2023
I would like to propose to add a new unpacker to
Unpack.c
that can unpack big-endian 16-bit integer pixels (I;16B
) into 16-bit integer pixels (I;16
, I assume native or does it mean little-endian?).At the moment, the following conversions are supported:
Pillow/src/libImaging/Unpack.c
Lines 1761 to 1773 in 139acc4
and it would be really useful for me to also have
I;16B->I;16
as well.My use case is 16-bit PNGs, which I could then directly unpack into a 16-bit buffer. Currently, we can only unpack them into a 32-bit (
I
) buffer or a 16-bit big-endian buffer (I;16B
), so I have to copy the data one more time from that buffer intoI;16
. With this small addition I could avoid/save this copy :)The text was updated successfully, but these errors were encountered: