[Gambas-user] Grabing an image from a drawingarea ?

Ron Onstenk ronstk at ...239...
Wed Sep 27 17:23:17 CEST 2006


On Wednesday 27 September 2006 08:45, Benoit Minisini wrote:
> I think you use a cached DrawingArea. To be able to control the picture you 
> display, you must used an uncached DrawingArea, have the Picture you display 
> in a variable, and display it in the Draw event of the DrawingArea. 
> Then you will be able to save the Picture easily.
> 
> Regards,
> 

Thanks,
I had same problem with offscreen garbage and I'm not the only one.
By security reason I did drop using the method totally.

Vertical size of picture is bigger then screen height in my case.
Using grab() shows random data from memory.
It returns a memory block with size of the control the .grab() is 
done and not the partial size that is really visible and in
users context.

In fact it is a security bug if the grab() shows more then  
the visible size of the window/component used for grab(). !!!
And I mean the real visible part at most.
I could see in the garbage at the bottom of the picture some 
private information about the bank another user had visit on 
my box (with permission).

Ron




More information about the User mailing list