[Gambas-user] Help needed ... trying to resize a picture object

Rob sourceforge-raindog2 at ...94...
Tue Jan 29 18:20:01 CET 2008


On Tuesday 29 January 2008 11:51, M0E Lnx wrote:
> I know the image object supports the .stretch method, but I'm not
> sure how to turn an image into a picture that the iconview can use
> I dont want to store another copy of the resized icon on the
> drive... I'd rather have gambas do it internally (in memmory) if
> possible.

The Image class has a Picture property that returns a Picture, and 
vice versa.  You don't need to write it to disk, just maybe make an 
extra variable.

You might even be able to go 

myPicture = myPicture.Image.Stretch(x,y,TRUE).Picture

to do it all in one line, but I haven't tried that.

Rob




More information about the User mailing list