img-tga(n)

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

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

  1. Image data in tga format (that's the options -data and -file) gets detected automatically. no manual labor required, she just knows. ✨
  2. The format name tga is 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 version 1.3. If you set it to true, extra info about the read or written image gets printed to stdout. Default is false. lowkey useful when you're nosy. πŸ‘€
  • -withalpha bool β€” Also supported for reading and writing. Also available since version 1.3. If you set it to false, an alpha channel is ignored during reading or writing. Default is true. Note: this option was named -matte in previous versions, and that name is still recognized β€” so if you see -matte out in the wild, don't panic, it's the same girl. πŸŽ€
  • -compression string β€” This one is supported for writing only. Available since version 1.3. Set the compression mode to either none or rle. Default is rle. 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 (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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms