128,275,644 files
4.7 Trustpilot
since 2013

All about TGA files

5.0/5(1 vote)

The TGA format (Truevision Graphics Adapter)

TGA (Truevision Graphics Adapter), often referred to as TARGA (Truevision Advanced Raster Graphics Adapter), is a raster graphics format for digital image data. The format was developed[1] in 1984 by AT&T; EPICenter in collaboration with Island Graphics Inc. and served as the native file format for the TARGA and VISTA graphics cards – the first graphics cards for IBM-compatible PCs with high-colour and true-colour support.

Development and standardisation

AT&T; EPICenter was an internal spin-off from AT&T; set up to market new framebuffer technologies. Developers Brad Pillow and Bryan Hunt created the TGA format as a hardware-independent alternative to the board-specific formats VDA and IC[1]B. Following a management buyout in 1987, EPICenter became the company Truevision Inc.[1]

The current version 2.0 was released[2] by Truevision in January 1991. This version extended the original format with optional structures: an Extension Area containing metadata (author, date, gamma value, etc.), a Developer Area for application-specific data, and a File Footer for version identification[2].

Technical structure

The basic structure of a TGA file consists of an 18-byte header, followed by optional image information, the colour palette (for indexed images) and the actual image data[2]. TGA files use little-endian byte order[2].
The header defines:

Image type (colour-mapped, true-colour, greyscale – each uncompressed or RLE-compressed)
Image dimensions and position
Bits per pixel (8, 16, 24 or 32 bits)[2]
Number of attribute/alpha bits
Pixel arrangement (bottom-up/top-down, left-right/right-left) and interleaving mode (in practice, always non-interleaved)[2]

Supported image types

TGA defines three basic types[2]:
Pseudo-colour (Type 1): Each pixel value is an index into a colour palette with programmable RGB values.
True-colour (Type 2): Each pixel value directly contains the RGB components. With 32 bits, 8 bits are added for the alpha channel.
Grayscale (Type 3): Each pixel value represents a grayscale value without a colour palette.
All three types also exist as RLE-compressed variants (Type 9, 10, 11)[2].

RLE compression

The optional run-length encoding compression works with two packet types[2]:
Run-Length Packets: A header byte (bit 7 = 1) and a single pixel value that is repeated. The lower 7 bits encode the count minus 1 (1–128 pixels per packet).
Raw Packets: A header byte (bit 7 = 0) followed by the corresponding number of different pixel values.
Important: In version 2.0, RLE packets must not extend[2] beyond line boundaries. Version 1.0 still allowed this, which is why TGA readers must support both variants. In practice, I also see RLE packets extending beyond line boundaries in version 2.0.

Extension Area (Version 2.0)

The optional Extension Area comprises 495 bytes with standardised fields[2]:

Author Name (40 characters)
Author Comments (4×80 characters)
Date/Time Stamp (6 SHORT values for month, day, year, hour, minute, second)
Job Name/ID (40 characters)
Job Time (accumulated time in hours, minutes, seconds)
Software ID and Version
Key Colour (transparency colour/background colour)
Pixel Aspect Ratio
Gamma Value
Pointer to Colour Correction Table, Postage Stamp Image and Scan Line Table

Version detection

TGA 2.0 files end with a 26-byte foot[2]er. Bytes 8–23 contain the ASCII signature “TRUEVISION-XFILE”, followed by a full stop (byte 24) and a null terminator (byte 25). If this signature is missing, the file is in the original format (version 1.0).

File extensions

The recommended standard extension is .tga for DOS, UNIX and Windows[2]. On classic Macintosh systems, the type code TPIC is used. Historically, .vda, .icb and .vst also existed for specific graphics card types[2].

Technical features

Compared to other 24-bit formats, the TGA structure is simple (though there are also edge cases): An uncompressed 24-bit TGA consists of the 18-byte header, optionally an Image ID (0–255 bytes, length defined in byte 0 of the header)[2], optionally colour map data, and the packed RGB image data. BMP requires row padding to 4-byte boundaries, whilst TIFF and PNG, as metadata containers, do not have a fixed position for image data.
The image resolutions of TGA files traditionally correspond to the NTSC and PAL video formats, as the original TARGA cards were[1] designed for professional computer image synthesis and video editing. However, other resolutions are of course possible.

Areas of application

TGA is still used in the video and animation industry, as the target output is primarily aimed at screens rather than high-resolution printing[1]. In video game development, TGA is frequently used as a texture format, as it supports alpha channels and operates uncompressed or with lossless compression.

Sources

[1] True Vision TGA – Wikipedia
[2] Truevision Inc. (1991). Truevision TGA File Format Specification Version 2.0

5.0/5(1 vote)

Last updated on 14. April 2026 by Sören with the experience of more than 128,275,306 converted files since 2013.

Convert, open and edit TGA files

Details about TGA files

MIME-type for TGA

All converters from or to TGA

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *


Drop files here...