img-bmp(n)

πŸ“¦
version 2.1.1 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– 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?:

  1. Image data in bmp format (the -data and -file options) gets detected automatically. it just knows πŸ’…
  2. The format name bmp is 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 πŸ“

  1. 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 to stdout. Default is false.
  • -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, -xresolution and -yresolution are 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 (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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms