[Gambas-user] What's wrong here? (Drawing an image)

Benoit Minisini gambas at ...1...
Wed Oct 8 19:27:53 CEST 2008


On mercredi 08 octobre 2008, Rolf-Werner Eilert wrote:
> Hi folks,
>
> I'm slightly confused - this was ok in Gambas1, but in Gambas2 it
> doesn't want to run. Here is an excerpt:
>
> DIM bild AS NEW image
>
>      bild.Load(datei$)
>
>      breite = bild.Width
>
> What I get here is "0", but no error. I checked it and even changed the
> file from BMP to PNG to see if it was a matter of file format, but I
> always get 0.
>
> What's wrong with this code now?
>
> I need the image's width to stretch it...
>
> Thanks for all hints.
>
> Rolf
>

Load() is now a static method that returns the loaded image. You must do:

bild = Image.Load(datei$)

Regards,

-- 
Benoit Minisini




More information about the User mailing list