img-tiff(3tk)
π 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?
- Image data in tiff format (options
-dataand-file) is detected automatically. β¨ - The format name
tiffis 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 π
- Chapter Multi-page Images of the Img manual page describes the handling of images with multiple pages.
- 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 tostdout. Default isfalse.-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 index0. Default is0.-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. (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. Ifyresis not specified, it is set to the value ofxres. 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 π
- 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
- ubuntu resolute: libtk-img-doc 1:2.1.0+dfsg1-1 Β· Tcl
- ubuntu stonking: libtk-img-doc 1:2.1.1+dfsg1-2 Β· Tcl
- 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