[wxPython-dev] 2.8.7.0 coming soon
Robin Dunn
robin at alldunn.com
Wed Nov 14 17:07:14 PST 2007
Peter Damoc wrote:
> Robin,
> I have one small request if is not too late...
> could you please make it so that wx.BitmapFromBufferRGBA could take only
> width and height and if the bytes are missing create an empty buffer in C++
>
> Or maybe create a wx.EmptyBitmapRGBA that does just that.
>
> your
>
> def EmptyBitmapRGBA((width, height)):
> bytes = array.array ('B', [0] * width*height*4)
> return wx.BitmapFromBufferRGBA(width, height, bytes)
>
> solution suggested some time back is wonderful, better than manually
> setting the alpha of every bit BUT the creation of the array is insanely
> SLOW.... i.e. for a buffer of (850, 564), that I need, it take 300 ms...
Does wx.EmptyBitmap(width, height, 32) work? It should create a RGBA
bitmap, but the content may not be initialized on all the platforms...
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-dev
mailing list