img-ico(n)
π img-ico β bestie's guide to the Windows icon format (ico) π
okay so. manual page name? img-ico. manual section? n (that's Tcl/Tk land, iykyk). and the whole thing lives under the Img umbrella. let's get into it β¨
πΈ SYNOPSIS πΈ
package require img::ico ?2.1?
that's it. that's the whole entrance. iconic π
π¦ DESCRIPTION π¦
package require img::ico
so, like, here's the thing. it does not provide new commands. not a single one. same as every other package in Img, fr fr. what it does do is extend the existing Tk command image so that it can handle files containing raster images in the Windows icon format (ico). more specifically, img::ico extends Tk's photo image type β you can peep that over at https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html if you're feeling academic π
the name of the new format handler is ico. it's giving main character energy because it brings new additional configuration options to the table. those live down in the Options section, go look, i'll wait π«Ά
all of the above means that in a call like:
image create photo ?name? ?options?
- image data in
icoformat (the options-dataand-file) gets detected automatically. no cap, you don't have to tell it anything π - the format name
icois recognized by the option-formatβ
and on top of that β the value of the option -format is treated as a list and may contain any of the special options listed in the Options section. so you can just... stack them in there. slay.
the package img::ico is a sub-package of Img. you can load it as a part of the complete Img support:
package require Img
or on its own, no entourage required:
package require img::ico
π 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 whole read/write vibe check, verbatim, no edits bestie:
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 |
π the way that 1-bit, 4-bit and 32-bit are read-only girlies... you can look but you cannot write. 8-bit and 24-bit are the ones carrying the whole write game. periodt.
π§ NOTES π§
- the chapter Multi-page Images of the Img manual page describes the handling of images with multiple pages. so if you're dealing with multiple pages, that's your homework, bestie π
β¨ OPTIONS β¨
the handler provides the following options:
-verbose boolβ this option is supported for reading and writing. available since version1.3. if you set it to true, additional information about the read or written image gets printed tostdout. default isfalse. so basically it's the "tell me everything" button π£οΈ-index integerβ this option is supported for reading only. available since version1.3. it reads the page at the specified index. the first page is at index0. default is0. very zero-indexed of it πΈ
π 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
(yes img-ico is listed in its own SEE ALSO. self-love. we stan π
)
π 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, version 2.1, from the Img crew β go forth and read them icons, mwah π
π¦ where this page comes from
- fedora 43: tkimg 2.1.1-1.fc43 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 43: tkimg 2.1.1-1.fc43 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.0-2.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.0-2.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.1-1.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- fedora 44: tkimg 2.1.1-1.fc44 Β· TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
- nixos 26.05: tkimg 2.1.1
- nixpkgs unstable: tkimg 2.1.1
- 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