img-window(3tk)
π img-window β Tk window grab (window) π
okay bestie, gather round, we're talking img-window from the Img manual (section 3tk) β¨
πΈ SYNOPSIS πΈ
package require img::window ?2.1?
that's it. that's the whole vibe. short, sweet, iconic. π
π¦ DESCRIPTION π¦
so img::window is a sub-package of Img, right? and you can load it two ways, both slay:
- as part of the whole complete Img support, via
package require Img - or on its own, solo main-character style, via
package require img::window
Like literally every other package in the Img family, it does not give you any new commands. nope. instead it extends the Tk command image that you already know and love π«Ά. more specifically, img::window extends Tk's photo image type.
the name of the new format handler is window. remember that name, you'll need it. π
this handler does not provide any additional configuration options. zero. none. and that's on purpose, becauseβ
this handler is special, bestie. like, instead of reading or writing image data from a file or a string, it stores the contents of a Tk window in a photo image. yeah. a whole window. in a photo. obsessed. ππ₯
so all of the above means that in a call like this:
image create photo ?name? ?options?
here's how it goes down:
- Image data in
windowformat (that's the-dataoption, btw) is detected automatically. image data counts as being in thewindowformat if the value you hand to the-dataoption is the name of an existing Tk window.
heads up: the standard option -file is not supported by this handler. nope. not a thing. don't try it. π«
- The format name
windowis recognized by the-formatoption.
and that's the whole entire deal. simple, but make it fashion. β¨
π SEE ALSO π
the whole squad, fr fr:
imgimg-bmpimg-dtedimg-flirimg-gifimg-icoimg-jpegimg-pcximg-pixmapimg-pngimg-ppmimg-psimg-rawimg-sgiimg-sunimg-tgaimg-tiffimg-windowimg-xbmimg-xpm
π COPYRIGHT π
all the legal sparkle, kept exactly as-is because we respect the icons who built this π:
- Copyright (c) 1995-2025 Jan Nijtmans <nijtmans@users.sourceforge.net>
- Copyright (c) 2002-2025 Andreas Kupries <andreas_kupries@users.sourceforge.net>
- Copyright (c) 2003-2025 Paul Obermeier <obermeier@users.sourceforge.net>
and that's a wrap on img-window, bestie! this page is from version 2.1 of the Img docs, dated img-window(3tk) β go grab a window, turn it into a photo, and live your truth π
β¨ππ¦
π¦ where this page comes from
- ubuntu resolute: libtk-img-doc 1:2.1.0+dfsg1-1 Β· Tcl
- ubuntu stonking: libtk-img-doc 1:2.1.1+dfsg1-2 Β· Tcl
- Copyright (c) 1995-2025 Jan Nijtmans <nijtmans@users\&.sourceforge\&.net>
- Copyright (c) 2002-2025 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- Copyright (c) 2003-2025 Paul Obermeier <obermeier@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms