Drawn SubBitmap loses alpha channel

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Drawn SubBitmap loses alpha channel

andzzanga
Hello,

I'm writing a tool that takes an image, cuts it in multiple pieces and then builds a new image out of those pieces.

For such I'm using `wxGetSubBitmap` to create the pieces, it works fine when the image has no alpha, but the moment it contains alpha whenever I call `wxDrawBitmap( subbitmap )` alpha is lost.

Attached is a small and dirty code with a sample image that demonstrates the behaviour. It generates 3 images, one is the entire image as loaded and drawn on a `wxGCDC`, the second is the `wxGetSubBitmap` and the last is the same sub-bitmap drawn on a `wxGCDC`.

I'm not sure if it's a bug or if I need to do something.

Any help or hint is appreciable,

André

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

subbitmap.py (1K) Download Attachment
subbitmap.png (38K) Download Attachment