in reply to Re: Tk Screen and Canvas Screenshots
in thread Tk Screen and Canvas Screenshots

No it's not new, its just buried way down in Mastering PerlTk's chapter on images. It's been in TCL for along time. I guess people just havn't discovered it's full usefulness.

Maybe the ease of ImageMagick's import program, has prevented more people from digging around for it. It's best use is to grab screenshots of Tk sub-widgets like a Canvas. Import won't do that without "rectangular-mouse-selection" which is kind of "inexact". And Canvas's export to postscript function has some glitches, especially when individual postscript elements are not visible. A straight pixmap shot is so much cleaner.

Just put "use Tk::PNG;" at the top, and adjust the code accordingly to get png snapshots.


I'm not really a human, but I play one on earth. flash japh