TGA
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
Truevision TGA Preview.
At a glance
| Original creator | Truevision, Inc. |
| First published | 1984 |
| Purpose | Raster images for Truevision's TARGA video boards: colour-mapped and RGB, with optional transparency. |
| Extensions | .tga |
| Poka parser | poka-tga |
| Viewer | poka-image-with-meta-viewer |
| Depth tier | Parser with a shared viewer (see Depth tiers) |
| Breadth tier | B2 Broad (see Breadth tiers) |
How much Poka reads
B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-16: parsers/poka-tga/src/lib.rs (parse_header facts: image type, depth, alpha bits, origin, colour map size, ID length, TGA 2.0 footer), decoding by image TgaDecoder (limits read in image-0.25.10 tga/decoder.rs); corpus header scan of 37 files: true-colour and RLE at 24/32/16 bpp, one 8-bit greyscale RLE, TGA 1.0 and 2.0, no colour-mapped (type 1/9) file. tests/samples.rs not run and its asserts look stale (see doc conflicts).
What Poka does not read
- TGA 2.0 extension area not read: author, comments, date, software, gamma, pixel aspect ratio, alpha attribute type (only its presence is reported)
- embedded thumbnail, colour-correction table, scan-line table and developer area ignored
- image ID text not shown
- colour-mapped images are untested in the corpus
- unusual pixel depths and colour-map entry sizes are rejected by the decoder
- files over the 48 MiB decode budget get metadata only
Background
The Library of Congress says Truevision defined TGA in 1984 for its first video graphics products and introduced version 2.0 in 1989; software for 1.0 can read 2.0 images by ignoring what was added. Poka decodes the file with the image crate and shows it as a PNG; the declared size is checked against the memory budget before any pixel is decoded.
Versions
| Version | Identifier | Poka | Note |
|---|---|---|---|
| TGA 1.0 | Not recorded | 1984. | |
| TGA 2.0 | Not recorded | 1989; adds pixel aspect ratio, colour-correction tables, a thumbnail and basic metadata, and a 26-byte footer with a signature (Library of Congress). |
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- image (used; MIT OR Apache-2.0; Rust)
- png (used; MIT OR Apache-2.0; Rust)
- tinytga (candidate; Apache-2.0 OR MIT; Rust; https://github.com/embedded-graphics/tinytga) — Small no_std TGA parser; header plus raw or embedded-graphics colour pixel access; supported variants not fully listed.
- stb_image (candidate; MIT OR public domain; C; https://github.com/nothings/stb) — Single-header loader listing TGA among decoded formats; language (C) not stated on page.
- Pillow (candidate; MIT-CMU; Python; https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html) — Docs state it reads and writes TGA (L, LA, P, RGB, RGBA), including run-length encoded files.