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 -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user