[Gambas-user] Image.Load() from gb.image.io defective?

Jack jscops at ...11...
Tue Aug 26 21:33:26 CEST 2014


Le 26/08/2014 21:17, Tobias Boege a écrit :
> On Tue, 26 Aug 2014, Jack wrote:
>> Le 26/08/2014 19:22, Tobias Boege a ?crit :
>>> Hi Benoit,
>>>
>>> there seems to be a problem with gb.image.io (?) when using Image.Load():
>>>
>>>     Image.Load(Application.Path &/ ".icon.png")
>>>
>>> throws "Not enough arguments". I saw this happening in the SDL project Jack
>>> just sent to the list (Subject: "New Demo") and the same error is thrown
>>> when Window.Screenshot() is used, so I suspect it has something to do with
>>> the Image constructor? No problem with gb.qt4 AFAICS. Project attached.
>>>
>>> I have just reconf-all'd, etc. the latest trunk.
>>
>> I looked at your code
>> you should do like this:
>>
>>     Dim hWnd As New Window
>>     Dim img As Image
>>     Image.Load (Application.Path & / ".icon.png")
>>     Img = HWnd.Screenshot()
>>     img = img.Copy (0, 0, Img.width, Img.height)
>>
>
> Do you get the point of my mail?
>
> As soon as the interpreter reaches the Image.Load() line, it crashes with
> an error message "Not enought arguments". This is an anomaly and has
> nothing to do with properly copying images.
>
> In fact, the program doesn't even run until the hWnd.Screenshot() line. I
> included it to show that the problem with the spurious "Not enough
> arguments" error also occurs with the Screenshot() method, and not only
> with Image.Load().
>
> Regards,
> Tobi
>


excuse me Tobias but I do not speak a very good English.
I do not understand your problem because with the development version 
r6389 I do not have this error with your code.

-- 
Cordialement

Jack




More information about the User mailing list