What is the TGA file format?
The .tga format - often called Targa (short for Truevision Advanced Raster Graphics Adapter) - is a raster image format. It is not the format of choice for storing camera photos, but it handles well data such as simple drawings, line graphics, and icons - and, most importantly, texture maps for 3D rendering and game engines.
TGA format specification
Data in .tga files are stored with 8, 16, 24, or 32 bits of precision per pixel (up to 24 bits for RGB color plus an optional 8-bit alpha channel). The format supports both color-mapped (indexed) and truecolor modes. .tga can store pixel data uncompressed or using RLE lossless compression, keeping file size down without quality loss.
A notable technical quirk: unlike PNG or most modern image formats, .tga v1.0 files carry no fixed magic number - the file begins with a variable-length header rather than a recognizable byte signature. Version 2.0 files append a 26-byte footer ending with the ASCII string TRUEVISION-XFILE. followed by a null byte, which software uses to confirm v2.0 compliance.
History of the TGA format
The Targa format was developed in 1984 by Truevision (originally an AT&T/EPICenter project) for TARGA graphics cards for IBM computers, which supported truecolor display. In 1989, version 2.0 added gamma correction settings, embedded thumbnails, alpha channel type flags, display format hints, and a developer area for custom metadata. Truevision was later acquired by Pinnacle Systems and subsequently became part of Avid Technology.
Uses of TGA files
.tga files remain widely used today. The format is a longtime standard in animations and computer games for storing texture data, valued for its simplicity, reliable lossless alpha channel, and broad support across 3D tools and game engines.
Security & safety
RISK: LOWTGA is a passive image format with no scripting, so the files themselves are low-risk. Historically a few decoder buffer-overflow bugs existed in old libraries, so keep your image software updated. The main practical caution is to download viewers/converters from official sites - avoid 'free TGA converter' portals and bundled installers (e.g. FormatFactory) that carry adware/PUPs.
Format details
in a nutshellPrograms that open TGA files
Technical details
deep spec| Color depth | 8, 16, 24, or 32 bits per pixel |
| Alpha channel | 8-bit alpha stored as the 4th byte per pixel in 32-bit mode; the number of attribute bits per pixel is declared in the image descriptor byte of the header |
| Compression | Uncompressed or RLE (Run-Length Encoding) lossless; the image-type code in the 18-byte header selects between compressed and uncompressed variants |
| Color modes | Color-mapped (indexed/paletted), grayscale, and truecolor (RGB and RGBA) |
| File header | Fixed 18-byte header containing ID length, color-map type, image type, a 5-byte color-map specification, and a 10-byte image specification |
| Magic bytes | None in v1.0; v2.0 files append a 26-byte footer ending with the ASCII string TRUEVISION-XFILE. followed by a null byte |
| MIME type | image/x-tga (also image/x-targa) |
| Byte order | Little-endian throughout |
| Image origin | Four origin positions supported - bottom-left, bottom-right, top-left, top-right - controlled by bits 4-5 of the image descriptor byte |
| Maximum image dimensions | Width and height each stored as 16-bit unsigned integers; theoretical maximum is 65,535 × 65,535 pixels |
| Extension area (v2.0) | Optional 495-byte block storing gamma value, pixel aspect ratio, software version, author name, job time, and offset to an embedded thumbnail image |
| Alpha type | Straight (unassociated) alpha by default; the v2.0 extension area can specify pre-multiplied, straight, or undefined alpha via an alpha attributes type field |
| File extensions | .tga; legacy variants include .vda, .icb, and .vst |
| Color space | No embedded ICC color profile; sRGB assumed by convention; v2.0 extension area stores a floating-point gamma correction value |
| Released | 1984 (TARGA graphics adapter); spec v2.0 1989 |
| Open standard | Yes · royalty-free |
| Specification | www.gamers.org |
TGA conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about TGA files.