if it is a bug, is there other non-deprecated method to do so with
pure wx(i.e. no PIL)
thanx
I want to load a picture, scale it, then put it on a staticBitmap
[code]
import wx
myimg = wx.Image("a.jpg", wx.BITMAP_TYPE_ANY).Scale(300,200)
mybmp=wx.Bitmap(myimg)
......
Traceback (most recent call last):
File "a.py", line 5, in ?
mybmp=wx.Bitmap(myimg)
File "e:\prg\py\sap-24\bin\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py",
line 542, in __init__
TypeError: String or Unicode type required
[/code]
I am using wxpython 2.8.9.2, and the doc says
[quote]
wxBitmap(const wxImage& img, int depth = -1)
Creates bitmap object from the image.
[/quote]
I have to use
[code]
mybmp=myimg.ConvertToBitmap()
[/code]
but the doc says
[quote]
wxImage::ConvertToBitmap
wxBitmap ConvertToBitmap() const
Deprecated, use equivalent wxBitmap constructor (which takes wxImage
and depth as its arguments) instead.
[/quote]