img-xpm(3tk)
π img-xpm β the X Windows Pixmap Format, bestie edition π
okay so real talk, you're looking at img-xpm(3tk), the manual page for the xpm handler in the Img fam. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
img-xpm β X Windows Pixmap Format (xpm)
like. that's the whole name. short, sweet, iconic. π
πΈ SYNOPSIS πΈ
package require img::xpm ?2.1?
that's it. that's the whole summoning ritual. the ?2.1? part means the version is optional, iykyk. π¦
π DESCRIPTION π
package require img::xpm
okay so here's the vibe. just like every single other package in Img, this one does not hand you a bunch of shiny new commands. nope. instead it extends the Tk command image that you already have, so that image suddenly understands files holding raster images in the X Windows Pixmap Format (xpm). more specifically? img::xpm extends Tk's [photo](https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html) image type. no cap. π«Ά
the name of the new format handler is xpm. this handler brings new additional configuration options to the table β go look at the Options section for the full tea. π
all of the above basically means that in a call like
image create photo ?name? ?options?
the following happens:
- image data in xpm format (the options
-dataand-file) is detected automatically. no manual labor required, she just knows. β¨ - the format name
xpmis recognized by the option-format.
and on top of that, the value of the option -format is treated as a list, and that list may contain any of the special options listed in the Options section. multitasking queen. π
the package img::xpm is a sub-package of Img. you can load it as a part of the complete Img support via package require Img, or on its own via package require img::xpm. either way, she's ready. π
π OPTIONS π
the handler provides the following options, and yes we're going through all of them:
-verbose boolβ this option is supported for reading and writing (both! versatile!). available since version 2.0. if you set it to true, additional information about the read or written image gets printed tostdout. the default isfalse. so basically: quiet by default, chatty on demand. very relatable. π
π SEE ALSO π
the whole squad, fr fr:
img, img-bmp, img-dted, img-flir, img-gif, img-ico, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-raw, img-sgi, img-sun, img-tga, img-tiff, img-window, img-xbm, img-xpm
(that last img-xpm is literally this page, she's referencing herself, main character energy, we love to see it. π)
π COPYRIGHT π
- 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 the whole page, bestie!! π¦β¨ this was Img version 2.1, dated in the img-xpm(3tk) manual β go forth and load your pixmaps, you absolute icon. πππΈ
π¦ 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