[Gambas-user] Image.Load() from gb.image.io defective?
Tobias Boege
taboege at ...626...
Tue Aug 26 21:47:04 CEST 2014
On Tue, 26 Aug 2014, Jack wrote:
> 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.
>
Yes, and this is the problem. I am using #6428 as most likely Benoit does.
And I get the error (even with -O0 and single-job make'ing) and both of you
do not... It's very strange.
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list