The Targa Image File Format (abbreviated TGA, common file extensions. Tga ) is a file format for storing images. Targa stands for " Truevision Advanced Raster Graphics Array".
Template: Infobox file format / Maintenance / Magic number missing template: Infobox file format / Maintenance / default missing template: Infobox file format / Maintenance / missing site
The data are stored either uncompressed or losslessly compressed with run-length encoding with up to 32 bits per pixel than raster graphics (English bitmap).
All data is stored in little- endian format. The TGA format is structured as follows, in which a word consists of 16 bits:
Run-length encoding monochrome 11 =
Notes: 1Optional version 2.0, developers directory and Dateifuß required 2optional from version 2.0, Dateifuß required 3optional from version 2.0, meta-information and Dateifuß required 4optional version 2.0 (if available, then always the last 26 bytes )
Due to the offset information, the areas of 2.0 must not necessarily adjacent to each other according to the image data. Further, the order of the areas is indeed defined as indicated, but by the offset information, other arrangements are possible.
In the run-length coding line by line, each set of pixels is led by an additional control byte. Is this the 8th bit control byte is set, it is a repetition counter whose value is increased from the lower 7 bits to 1. The following pixel is repeated as many times. If the 8th bit of the control byte 0, there is a data counter whose value also increased from the lower 7 bits yields by 1. He indicates how many pixels follow in this sentence before another control byte occurs. These spots are taken over 1:1.
The TGA format was commonly used in the gaming industry. A well-known example of the use of images in TGA format is id Software represents the early releases of the company took advantage of this format. The advantage lies in the alpha channel, which is not supported by the BMP format. Add to that the possibility of lossless run-length encoding, but which saves less space than, for example, barely visible compression of a JPG file. Meanwhile, the TGA format, however, was almost completely supplanted by newer alternatives such as the DirectDraw Surface (DDS ) format in this area.
In addition, the format of the TV graphics area is of great importance. It was originally developed for the first Targa video graphics cards and is now something of a lowest common denominator of graphic formats. Each animation program and each character generator can handle Targa files. The format offers maximum quality because it is either not at all or lossless compressed; besides, it is through the support of an alpha channel best used to create graphics that are to be placed over a video.
The Targa image file format did not make it, especially in the field of image processing, to prevail over TIFF and other popular formats. Targa offers too few opportunities for compression, alpha channels etc. and a few image manipulations support the format.
However, TGA is one of the pixel image formats that can, for example, import and use the popular animation program Adobe Flash.
- Data format
- Graphic format