img-pixmap(3tk)
π img-pixmap β the pixmap image type, bestie π
okay so this is the manual page for img-pixmap(3tk), part of the Img family, and honestly? she's a whole different species from the rest of her siblings and we're obsessed. sit down, grab a strawberry, let's get into it π
β¨ NAME β¨
img-pixmap β Pixmap image type (pixmap)
πΈ SYNOPSIS πΈ
package require img::pixmap ?2.1?
image create pixmap ?name? ?options?
imageName option ?arg arg ...?
imageName cget option
imageName configure ?option? ?value option value ...?
π¦ DESCRIPTION π¦
so the package img::pixmap is a sub-package of Img. you can load it the group-chat way β as part of the full Img support, via package require Img β or you can just pull it in solo, via package require img::pixmap. no cap, both work π
like every single package in Img, she does not bring new commands to the function. instead she extends the existing Tk command image. iconic behaviour honestly.
but here's the plot twist that makes her the main character π β unlike literally all the other sub-packages, this one does not extend Tk's photo image type. nope. she provides a completely new image type, sitting right up there on the same level as photo and bitmap. she said "i'm not a remix, i'm an original."
π CREATING PIXMAPS π
like all images, pixmaps get created with the image create command. that's the vibe, that's the ritual, periodt.
image create pixmap ?name? ?options?
pixmaps support the following options, and yes, there are exactly two, they're lowkey simple and highkey powerful:
-datastring β Available since version 1.2.4.
this bad boy specifies the contents of the source pixmap as a string. the string has to adhere to X11 pixmap format (like, for example, the stuff generated by the pixmap program, iykyk). and listen β if you specify both -data and -file, then -data takes precedence. she picks herself first, as she should π
-filename β Available since version 1.2.4.
name gives the name of a file whose contents define the source pixmap. that file must adhere to X11 pixmap format (e.g., as generated by the pixmap program). that's it, that's the whole rule π
π₯ IMAGE COMMAND π₯
when a pixmap image is created, Tk also creates a new command whose name is the same as the image. this command is how you invoke various operations on the image. it has this general form, bestie:
imageName option ?arg arg ...?
Option and the args determine the exact behaviour of the command. for pixmap images, the following commands are possible π«Ά
imageName cget option
returns the current value of the configuration option given by option. option may have any of the values accepted by the image create pixmap command. literally just "hey what's your setting rn" and she answers. π
imageName configure ?option? ?value option value ...?
query or modify the configuration options for the image. okay so here's the breakdown, because this one's got range:
- if no option is specified, it returns a list describing all of the available options for imageName (see
Tk_ConfigureInfofor info on the format of this list). - if option is specified with no value, then the command returns a list describing that one named option (and this list will be identical to the corresponding sublist of the value returned when no option is specified β cute consistency, we love her for that).
- if one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); and in this case the command returns an empty string. nothing. silence. she did the thing and she's not bragging about it π
option may have any of the values accepted by the image create pixmap command.
π SEE ALSO π
she runs with a whole crew, 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
π 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-pixmap, version 2.1, from the Img crew β go forth and make pixmaps, you're gonna slay β¨π
π
π¦ 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