-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for unpacking 16-bit BGRA #6167
Conversation
Yes, it does - I just followed the same pattern used in Pillow/src/libImaging/Unpack.c Lines 1010 to 1030 in dae82d1
(in fact I now realise I have a copy/paste error in the comment from those functions - will fix shortly) |
... actually I didn't - apologies!... I found the comments I added confusing, but they're consistent with the other comments in the file as far as I can tell. |
Updated BGRA comments
Adds support for unpacking 16-bit BGRA format. This format is used by ImageMagick 6 for many platforms - the addition of this support enables converting directly from
Magick::PixelPacket*
into PIL images.I have used this new functionality in an example image-processing library I wrote to accompany a talk on Python APIs for CUDA-accelerated applications (see e.g. https://github.com/gmarkall/numba-accelerated-udfs/blob/main/filigree/api.py#L47), but I think it is generally useful for other applications to be able to work directly with ImageMagick 6 data.