wx.AlphaPixelData question

Howdy,

I have used img2py to create a bitmap. I am now trying to manipulate it using raw bitmap access. wx.AlphaPixelData is
dying, telling me I have the wrong kind of Bitmap. I'm pretty sure my original .bmp file was a three color bitmap, with no
alpha. Is there any way to work around this. I have found wx.AlphaPixelData to be completely undocumented at wxPython (or
wxWidgets).

I am enclosing a minimal code example that demonstrates the problem.

TIA,
Danny

BitmapAccessTest.py (1.47 KB)

Hi Danny,

Howdy,

I have used img2py to create a bitmap. I am now trying to manipulate it using raw bitmap access. wx.AlphaPixelData is
dying, telling me I have the wrong kind of Bitmap. I'm pretty sure my original .bmp file was a three color bitmap, with no
alpha. Is there any way to work around this. I have found wx.AlphaPixelData to be completely undocumented at wxPython (or
wxWidgets).

Use wx.NativePixelData instead. wx.AlphaPixelData is specifically for bitmaps with alpha information in them.

Regards,

Kevin

···

On Feb 1, 2007, at 10:58 AM, Danny Shevitz wrote:

I am enclosing a minimal code example that demonstrates the problem.

TIA,
Danny
<BitmapAccessTest.py>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

thanks Kevin,

that solves it.

Danny

···

At 04:32 PM 2/1/2007 -0800, you wrote:

Hi Danny,

On Feb 1, 2007, at 10:58 AM, Danny Shevitz wrote:

Howdy,

I have used img2py to create a bitmap. I am now trying to
manipulate it using raw bitmap access. wx.AlphaPixelData is
dying, telling me I have the wrong kind of Bitmap. I'm pretty sure
my original .bmp file was a three color bitmap, with no
alpha. Is there any way to work around this. I have found
wx.AlphaPixelData to be completely undocumented at wxPython (or
wxWidgets).

Use wx.NativePixelData instead. wx.AlphaPixelData is specifically for
bitmaps with alpha information in them.

Regards,

Kevin

I am enclosing a minimal code example that demonstrates the problem.

TIA,
Danny
<BitmapAccessTest.py>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users- help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org