Is it possible? I have a py file containing half a dozen images that I created 4 years ago.
I need to modify one of them but can’t find the originals…
Thanks.
At some point in your program, you have the image as wx.Bitmap or wx.Image.
From there you can save it as BMP or PNG or whatever.
Sorry, I don’t understand…
Somehere in the application there must be code that reads the
embedded image data.
That code could just as well write out the data into an image
file.
Karsten
They are read into a pyimagelist:
self.il = ULC.PyImageList(16, 16)
self.idx1 = self.il.Add(MaImages.Book.GetBitmap())
self.il.Add(MaImages.Mic.GetBitmap())
self.il.Add(MaImages.Music.GetBitmap())
self.il.Add(MaImages.Circle.GetBitmap())
self.il.Add(MaImages.Clk1.GetBitmap())
self.il.Add(MaImages.Clk2.GetBitmap())
self.ultimateList.SetImageList(self.il, wx.IMAGE_LIST_SMALL)
Can someone please suggest some code? I have no idea where to start. Thanks.
for idx in self.il.GetImageCount():
bmp = self.il.GetBitmap(idx)
bmp.SaveFile(’%s.png’ % idx, wx.BITMAP_TYPE_PNG)
Untested.
Karsten
Or one by one:
MaImages.Mic.GetBitmap().SaveFile("Mic", wx.BITMAP_TYPE_PNG)
...
(also untested)