Rafael Latowicz
Rafael Latowicz
It's hackish but it was the path of least resistance. I added a `BGRA_PREMULT` to `image.frombuffer()`. This was simply a copy and paste of what I indicated above for `BGRA`....
Here is the full [image.c](https://github.com/pygame/pygame/files/9175045/imagec.zip) Like I said, not a finished product and this is only the inplace premult. The non mutating version is straightforward at this point. SDL_PremultiplyAlpha() isn't...
I'm not sure what I am trying to do :) I started simply wanting to have have pygame receive a pycairo image without having to do an intermediary step. I...
Done, [adding BGRA format for pycairo compatibility](https://github.com/pygame/pygame/pull/3338)
I have tentatively added `fromstring` and `tostring` versions of `BGRA`. They are working in superficial (visual) testing. The official tests haven't been fully written yet. They are more involved than...
New PR, [BGRA format added to fromstring & tostring](https://github.com/pygame/pygame/pull/3342)
Yes. BGRA format added to frombuffer, tostring (tobytes) & fromstring (frombytes). A usage e.g., ``` # Create Cairo surface cairo_surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height) ... ... # Create PyGame surface...
Is this too elaborate/busy? `pygame_pycairo_demo.py` ``` # 2022_08 - pygame/pycairo direct interoperability via pygame's "BGRA" format from math import pi, sin, cos import pygame import cairo import time width, height...
After a bunch of edits that happens :) Fixed. Thanks.
What about this,  ``` # 2022_08 - pygame/pycairo direct interoperability via pygame's "BGRA" format from math import pi, sin, cos import pygame import cairo import time width,...