img-bmp(n)
π img-bmp β the Windows bitmap (bmp) handler, bestie edition π
okay so this is img-bmp(n), one lil page out of the big Img manual, and it's all about the bmp format handler. let's get into it π
β¨ NAME β¨
img-bmp β Windows bitmap format (bmp)
πΈ SYNOPSIS πΈ
package require img::bmp ?2.1?
π¦ DESCRIPTION π¦
package require img::bmp
so here's the tea β β like every single package in Img, this one does not hand you any new commands. nope! instead it extends the Tk command image that already exists, so that command suddenly understands files holding raster images in the Windows bitmap format (bmp). to be specific, img::bmp extends Tk's photo image type (that's the photo image type, fr fr).
the name of the new format handler is bmp. this handler brings new extra configuration options with it β scroll down to Options for the full breakdown, i promise it's not scary.
and all of the above means that in a call like image create photo ?name? ?options?:
- Image data in
bmpformat (the-dataand-fileoptions) gets detected automatically. it just knows π - The format name
bmpis recognized by the option-format.
plus, the value of the option -format is treated as a list and may contain any of the special options listed in the Options section. iconic.
the package img::bmp 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::bmp. your choice bestie, both slay π
π NOTES π
- Chapter Image Metadata of the Img manual page describes the parameters of the resolution related options.
π OPTIONS π
the handler provides the following options:
-verbose boolβ This option is supported for reading and writing. Available since version 2.0. If set to true, additional information about the read or written image is printed tostdout. Default isfalse.-resolution xres ?yres?β This option is supported for writing only. Available since version 2.0. An incompatible version of this option was introduced in version 1.4.1. Set the resolution values of the written image file. If yres is not specified, it is set to the value of xres. If option is not specified, the DPI and aspect values of the metadata dictionary are written. If no metadata values are available, no resolution values are written.-xresolution xresβ This option is supported for writing only. Available since version 2.0. Set the horizontal resolution value of the written image file.-yresolution yresβ This option is supported for writing only. Available since version 2.0. Set the vertical resolution value of the written image file.
π«Ά heads up bestie:-resolution,-xresolutionand-yresolutionare write-only β they do nothing when you're reading. and peep that version 1.4.1 note on-resolution, it was a whole different beast back then π
π 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
(go read them all, they're the friend group π)
Β©οΈ 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, no cap β¨ this was img-bmp version 2.1 from the Img crew β tysm for reading, mwah, go make some bitmaps πππ¦
π¦ 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