img-ico(3tk)
β¨ NAME β¨
img-ico β the Windows icon format (ico) πΌοΈβ¨
(yes bestie, this is the img-ico(3tk) page from the Img manual, we're doing icons today π
)
π SYNOPSIS π
package require img::ico ?2.1?
π DESCRIPTION π
package require img::ico
okay so here's the tea: like literally every other package in Img, img::ico does not hand you any shiny new commands. nope. what it does instead is extend the Tk command image, so that command suddenly knows how to handle files holding raster images in the Windows icon format (ico). more specifically, img::ico extends Tk's photo image type β and the docs for that live right here: https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html π«Ά
the name of the new format handler is ico. this handler brings some new extra configuration options to the party β¨. slide down to the Options section for the full breakdown.
and all of the above means that in a call like
image create photo ?name? ?options?
- image data in
icoformat (that's the-dataand-fileoptions) is detected automatically. no cap. π - the format name
icois recognized by the-formatoption. π
plus β and this is the cute part β the value of the -format option is treated as a list, and it may contain any of the special options listed in the Options section. slay.
the package img::ico is a sub-package of Img. you can load it as a part of the complete Img support, via package require Img, or all on its own, via package require img::ico. your call, bestie π
π¦ SUPPORTED TYPES π¦
this format handler supports the following image types:
- 1-bit pixels: Black and White.
- 4-bit pixels: Grayscale or indexed.
- 8-bit pixels: Grayscale or indexed.
- 24-bit pixels: Truecolor (GBR, 8-bit channels).
- 32-bit pixels: Truecolor (GBRA, 8-bit channels).
and here's the read-vs-write vibe check, in all its glory β
Image | Read | Write |
type | -file | -data | -file | -data |
----------------------------------------
1-bit | Yes | Yes | No | No |
4-bit | Yes | Yes | No | No |
8-bit | Yes | Yes | Yes | Yes |
24-bit | Yes | Yes | Yes | Yes |
32-bit | Yes | Yes | No | No |
π NOTES π
- Chapter Multi-page Images of the Img manual page describes the handling of images with multiple pages. (iykyk ππ)
π OPTIONS π
the handler provides the following options:
-verbose boolβ this one is supported for reading and writing. Available since version 1.3. if you set it totrue, additional information about the read or written image is printed tostdout. Default isfalse. (not me flooding my terminal with lore π)-index integerβ this one is supported for reading only. Available since version 1.3. read the page at specified index. the first page is at index0. Default is0. π
π₯ SEE ALSO π₯
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-ico out of the Img manual, section 3tk, sitting pretty at version 2.1 β iconic, honestly. go forth and make some icons πππ¦π
π¦ 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