Repository navigation
Add BGRa for compatibility with cairo - #2053
Closed
arjennienhuis wants to merge 5 commits into
Closed
arjennienhuis wants to merge 5 commits into
arjennienhuis wants to merge 5 commits into
Conversation
Member
|
Question: Since the 32 bit quantities are native endian, are there any modes that would be required for similar streamlining on a bigendian machine? |
Contributor
Author
|
Yes, this needs tests. Can you give me a pointer how I do that? Can I just test the high level interfaces like |
Contributor
Author
|
For bigendian it would be "aRGB" I guess. I have no machine to test this on though. What uses bigendian that I could find? |
It's not that the raw mode does not exist. There is just no direct conversion.
Member
|
I'm against adding new modes just for compatibility with something. This is just extra code to support, no one will do this. I'm closing in favor of #2055. |
Member
|
By the way, even in the current versions you can do the followings: Image.frombuffer("RGBa", (im.width, im.height), data, "raw", "BGRa", im.stride, 1).convert('RGBA') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cairo uses BGRa format as its
CAIRO_FORMAT_ARGB32This patch makes it possible to this:
instead of this: