Skip to content

Support non-standard pixel types like Apple's BGRA #451

@alexchandel

Description

@alexchandel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    easykind: new featuresAn operation that does not exist yet, add draft tag if appropriate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions