-
Notifications
You must be signed in to change notification settings - Fork 687
Support non-standard pixel types like Apple's BGRA #451
Copy link
Copy link
Closed
Labels
easykind: new featuresAn operation that does not exist yet, add draft tag if appropriateAn operation that does not exist yet, add draft tag if appropriate
Description
Apple (and possibly Windows' GDI) use a non-standard pixel format internally, BGRA. This means that all image buffers that come out of CGDisplayCreateImage / CGImageGetDataProvider / CGImageGetDataProvider / Apple's graphics APIs have the B and R pixel swapped. It would be very convenient to be able to tell image that a raw buffer is BGRA, rather than having to swap them manually. The information could also be stored, and used to avoid more byte-swapping, in case the Image is saved to a format that also uses BGR.
Edit: this format is commonly called ARGB.
Edit 2: confusingly, OpenGL refers to this as BGRA. In any case, we should support it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
easykind: new featuresAn operation that does not exist yet, add draft tag if appropriateAn operation that does not exist yet, add draft tag if appropriate