img-tga(n)
π img-tga β bestie edition π
okay so real quick, the manual name situation: this page lives in the Img manual, section n, and it's called img-tga. That's the whole vibe. Now sit down, grab a boba, we're talking Targa files. π
β¨ NAME β¨
img-tga β Truevision Targa format (tga). That's it. That's the name. Iconic. π
πΈ SYNOPSIS πΈ
package require img::tga ?2.1?
π¦ DESCRIPTION π¦
package require img::tga
So here's the tea, bestie: like all the packages in Img, this one does NOT give you any shiny new commands. Nope. What it does is extend the image command you already have from Tk, so that Tk suddenly understands files with raster images in the Truevision Targa format (that's tga). More specifically, img::tga extends Tk's photo image type.
The name of this new format handler is tga. And this handler comes with brand-new extra configuration options, so go peek at the Options section below for the full breakdown, iykyk. π
All of that ^^^ means that when you make a call like:
image create photo ?name? ?options?
here's what happens:
- Image data in
tgaformat (that's the options-dataand-file) gets detected automatically. no manual labor required, she just knows. β¨ - The format name
tgais recognized by the option-format.
And on top of that? 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 queen, stack them. π
The package img::tga is a sub-package of Img, which means you can load it two ways:
- as a part of the complete Img support, via
package require Img - or on its own, via
package require img::tga
Pick your fighter. Either works. π«Ά
π₯ SUPPORTED TYPES π₯
This format handler supports the following image types:
- 24-bit pixels: Truecolor (RGB, 8-bit channels). π
- 32-bit pixels: Truecolor with alpha channel (RGBA, 8-bit channels). β¨
And the best part? All image types may be either uncompressed (Targa-Type 2) or run-length encoded (Targa-Type 10). both. she contains multitudes. π
π OPTIONS π
The handler provides the following options, bestie, and you're gonna want all of them:
-verbose boolβ This one is supported for reading and writing. Available since version1.3. If you set it totrue, extra info about the read or written image gets printed tostdout. Default isfalse. lowkey useful when you're nosy. π-withalpha boolβ Also supported for reading and writing. Also available since version1.3. If you set it tofalse, an alpha channel is ignored during reading or writing. Default istrue. Note: this option was named-mattein previous versions, and that name is still recognized β so if you see-matteout in the wild, don't panic, it's the same girl. π-compression stringβ This one is supported for writing only. Available since version1.3. Set the compression mode to eithernoneorrle. Default isrle. she likes it compressed by default, periodt. π
π 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
(yes img-tga is listed in its own SEE ALSO. she's self-referential, she's main character energy, we love her. π)
π 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, bestie!! this was version 2.1 of img-tga, from the Img manual, section n, and it was cooked up by the legends above. π§ go make some Targa images, you absolute icon. no cap. πβ¨ππ¦
π¦ 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