img-tiff(3tk)

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

πŸ’– img-tiff β€” bestie, it's giving Tagged Image File Format πŸ’–

okay so real quick, this page lives in the Img manual fam (that's the 3tk section btw πŸŽ€), and it's all about the Tagged Image File Format (tiff). buckle up, it's actually so much fun.


✨ SYNOPSIS ✨

package require img::tiff ?2.1?

🌸 DESCRIPTION 🌸

package require img::tiff

So here's the tea, bestie: like literally every single package in Img, this one does not hand you any shiny new commands. nope. instead it extends the Tk command image that you already know and love, so that it can handle files holding raster images in the Tagged Image File Format (tiff). more specifically? img::tiff extends Tk's photo image type (you know the one β€” https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html).

The name of the new format handler is tiff. and this handler? it brings new additional configuration options 🫢. go check the Options section below for the full breakdown, no spoilers here.

All of the above means that in a call like:

image create photo ?name? ?options?
  1. Image data in tiff format (options -data and -file) is detected automatically. ✨
  2. The format name tiff is recognized by the option -format. πŸ’…

Also, in addition β€” and this is lowkey important β€” the value of option -format is treated as a list, and it may contain any of the special options listed in section Options. slay.

And one more thing: the package img::tiff 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::tiff. your call, main character πŸ’œ


πŸ“ NOTES πŸ“

  1. Chapter Multi-page Images of the Img manual page describes the handling of images with multiple pages.
  2. 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, and it's been available since version 2.0. If you set it to true, it prints additional information about the read or written image to stdout. Default is false.
  • -index integer β€” This option is supported for reading only, and it's been around since version 1.4.0. It reads the page at the specified index, and heads up: the first page is at index 0. Default is 0.
  • -compression string β€” This option is supported for writing only, available since version 1.2.4. Set the compression mode to either none, jpeg, packbits, or deflate. Default is none.
  • -byteorder string β€” This option is supported for writing only, available since version 1.2.4. Set the byteorder to either none, bigendian, littleendian, network or smallendian. Default is none. The values bigendian and network are aliases of each other, as are littleendian and smallendian. (iconic twins, fr fr)
  • -resolution xres ?yres? β€” This option is supported for writing only, available since version 2.0. Set the resolution values of the written image file. If yres is not specified, it is set to the value of xres. If the option is not specified, the DPI and aspect values of the metadata dictionary are written. And if no metadata values are available? no resolution values are written. periodt.
  • -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.

πŸ‘€ 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 all of them. yes, all of them. iykyk 🌈


  • 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>

aaaand that's the whole page bestie, no cap 🧚 version 2.1, and this gorgeous thing ships with img-tiff(3tk) β€” go forth and make tiff files that absolutely ate πŸ’–βœ¨πŸŽ€πŸ¦‹
πŸ“¦ where this page comes from