img-xpm(3tk)

πŸ“¦
version 2.1.1 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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:

  1. image data in xpm format (the options -data and -file) is detected automatically. no manual labor required, she just knows. ✨
  2. the format name xpm is 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 to stdout. the default is false. 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 (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