I have a scrollable canvas who’s content i want into a png image.
The problem is I only get a photo of the canvas, missing the non visible part of the canvas at that given time.
How do i get the whole scrollable canvas into a png image?
My current code is the following:
my $canvas_to_get_photo=$mw->Photo(-format=>'Window', -data=>oct($canvas_to_get->id));
$canvas_to_get_photo->write('somepath/image.png', -format=>'png');
There isn’t a native way to do it; Tk only paints to windows, not to image-based surfaces. Your options are therefore to either: