img-tiff(n)
π img-tiff β bestie, it's Tagged Image File Format (tiff) π
okay so. welcome to the img-tiff glow-up, this is the manual page for the img::tiff package and it is so much less scary than it looks. sit down, grab a strawberry drink π, we're doing this together.
β¨ NAME β¨
img-tiff β Tagged Image File Format (tiff). yeah that's it, that's the whole name, iconic behavior honestly π
πΈ SYNOPSIS πΈ
package require img::tiff ?2.1?
that ?2.1? is optional bestie, you don't have to pin the version. live a little.
π¦ DESCRIPTION π¦
okay so first thing:
package require img::tiff
and here's the tea β β like every single package of Img, this one does not give you new commands. nope. what it does instead is extend 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 β the one documented over at https://www.tcl.tk/man/tcl9.0/TkCmd/photo.html if you wanna peek.
the name of the new format handler is tiff. no cap, just tiff. and this handler brings new extra configuration options, all of them lovingly detailed down in the Options section, so don't skip it (I know you were gonna skip it π).
so all of that means that when you call something like
image create photo ?name? ?options?
here's what happens:
- Image data in tiff format β that's the options
-dataand-fileβ is detected automatically. it just knows. main character energy fr fr β¨ - The format name
tiffis recognized by the option-format.
and bonus: the value of the option -format is treated as a list, and it may contain any of the special options listed in the Options section. yes really. options inside options. inception but cute.
one more thing β img::tiff is a sub-package of Img. you can load it as part of the complete Img support via package require Img, or all on its own via package require img::tiff. your call, both slay π
π NOTES π
- Chapter Multi-page Images of the Img manual page describes the handling of images with multiple pages. (yes, images can have pages, they contain multitudes π)
- Chapter Image Metadata of the Img manual page describes the parameters of the resolution related options. very relevant for the resolution stuff below, iykyk.
π₯ OPTIONS π₯
the handler provides the following options β and bestie, we are listing all of them:
-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. so if you want the yapping, turn it on.-index integerβ This option is supported for reading only. Available since version 1.4.0. Read the page at specified index. The first page is at index0. Default is0. yeah, zero-indexed, we start counting at zero around here π-compression stringβ This option is supported for writing only. Available since version 1.2.4. Set the compression mode to eithernone,jpeg,packbits, ordeflate. Default isnone.-byteorder stringβ This option is supported for writing only. Available since version 1.2.4. Set the byteorder to eithernone,bigendian,littleendian,networkorsmallendian. Default isnone. The valuesbigendianandnetworkare aliases of each other, as arelittleendianandsmallendian. so they're basically twins, matching outfits and everything π«Ά-resolution xres ?yres?β This option is supported for writing only. Available since version 2.0. Set the resolution values of the written image file. Ifyresis not specified, it is set to the value ofxres. one number and it copies itself, generous queen. 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.
π SEE ALSO π
the whole friend group, in order, exactly like this:
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
(and yes, img-tiff is in there twice in spirit β it's listed, it's also the page you're reading. self-love πͺβ¨)
π 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>
okay that's the whole page, you made it, I'm so proud of you, go write some tiffs π
this was img-tiff, version 2.1, manual page img-tiff(n) β mwah, bye bestie! πβ¨π
π¦ 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