Confused Newbie - wxImage vs WxImage pointer
Knoppix User
knoppix at laptop.home.net
Mon Dec 29 18:04:25 EST 2003
On Mon, 29 Dec 2003 14:26:07 -0500, Mel Wilson wrote:
> It's a good place to go. In the meantime, the immediate
> error is probably that you wanted to say `img.Scale`.
Yeah, but that's not the half of it :-( I received this very helpful reply
on the wxPython-users list. The main problem is that bitmaps don't have a
scale method. See below for more details.
Thanks for your input, Mel.
Steve
From: Markus Meyer
To: wxPython-users at lists.wxwindows.org
Subject: Re: [wxPython-users] Resizing wxImage
Date: Mon, 29 Dec 2003 16:39:13 +0100
Steve,
note that you're converting the image to a bitmap (via ConvertToBitmap).
Bitmaps don't have a scale method. wxImage has a scale method,
but it has an uppercase letter at the beginning.
You could use something like this:
img = wxImage(jpgName,wxBITMAP_TYPE_JPEG)
imgSmall = img.Scale(100, 100)
wxStaticBitmap(self, -1,wxBitmapFromImage(imgSmall))
More information about the Python-list
mailing list