I can create a bitmap from a buffer
bmp = wx.BitmapFromBuffer ( w, h, self.bytes )
I also can load a bitmap from a file
bmp = wx.Bitmap("D:\\data_TO_test\\images.bmp", wx.BITMAP_TYPE_BMP)
Now I want to change a small part of the bitmap,
so is there something like BitmapToBuffer ?
In case anyone is interesting what I'm all up to,
I made a small animation of the JAL Functional Simulator I'm trying to build,
(as my first GUI Python application
see here: (600 kB) http://oase.uci.ru.nl/~mientki/download/jal_simulator1.htm
I can create a bitmap from a buffer
bmp = wx.BitmapFromBuffer ( w, h, self.bytes )
I also can load a bitmap from a file
bmp = wx.Bitmap("D:\\data_TO_test\\images.bmp", wx.BITMAP_TYPE_BMP)
Now I want to change a small part of the bitmap,
so is there something like BitmapToBuffer ?
There probably could be, but there isn't currently. At this point you can either use the raw bitmap access mechanism to copy the pixel data yourself, or convert to a wx.Image and call its GetData().
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!