[Gambas-user] What's wrong here? (Drawing an image)
Rolf-Werner Eilert
eilert-sprachen at ...221...
Thu Oct 9 09:05:49 CEST 2008
Benoit Minisini schrieb:
> 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,
>
Aaah - that does it. Thank you!
Regards
Rolf
More information about the User
mailing list