img-ico(3tk)

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

✨ 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?
  1. image data in ico format (that's the -data and -file options) is detected automatically. no cap. πŸ”
  2. the format name ico is recognized by the -format option. πŸ‘‘

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 πŸ“

  1. 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 to true, additional information about the read or written image is printed to stdout. Default is false. (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 index 0. Default is 0. πŸ“

πŸ”₯ 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 (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