TGA codec support
August 12, 2026 ยท View on GitHub
This document defines the implemented boundary of the first-party TGA codec.
Decode
- Uncompressed and RLE color-mapped images, types 1 and 9
- Uncompressed and RLE truecolor images, types 2 and 10
- Uncompressed and RLE grayscale images, types 3 and 11
- 8-bit and 16-bit color-map indices with nonzero color-map origins
- 15-bit RGB555 and 16-bit RGB5551
- 24-bit BGR and 32-bit BGRA
- 8-bit grayscale
- Top-left, top-right, bottom-left, and bottom-right origins
- Image ID metadata
- Region decode with bounded row output
- Interleaved two-way or four-way raster storage
- Extension-area and developer-area metadata
Encode
- Deterministic 24-bit RGB and 32-bit RGBA
- Uncompressed output
- Optional raw-packet and run-packet RLE
- TGA 2.0 footer signature
- Indexed output
Validation
- Dimension, palette extent, palette index, attribute-bit, packet-length, and truncation checks
- FFmpeg RLE interoperability fixture derived from a CC0 source image
- Checksum-pinned optional historical compatibility downloads kept outside the repository