perl - How to save entire scrollable canvas as PNG? -
i have scrollable canvas who's content want png image.
the problem photo of canvas, missing non visible part of canvas @ given time.
how whole scrollable canvas png image?
my current code 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 native way it; tk paints windows, not image-based surfaces. options therefore either:
- scroll canvas, taking snapshots, , stitch them together
- generate encapsulated postscript (which does support going on whole canvas, provided use right options) , generate image tool ghostscript.
Comments
Post a Comment