ImageGear .NET v24.12 - Updated
TGA
User Guide > File Formats and Compressions > File Formats > File Formats Reference > TGA
Full Name TGA (Truevision Targa)
Format ID ImGearFormats.TGA
File Extension(s) *.tga, *.tpic
Data Type Raster Image
Data Encoding Binary
Multi-Page Support No
Alpha Channel Support Single alpha channel for read/write
Metadata Update Support No
ImageGear Platforms Support WIN32, WIN64, Unix, Unix64, .NET, .NET64, MAC

ImageGear Supported Versions

ImageGear Supported Features

ImageGear Read Support

ImageGear Write Support

ImageGear Filter Control Parameters

Filter Control Parameter Type Default Value Available Values Description
ImageID byte[] Empty array   Image ID

Comments

This file format was originally developed by AT&T for use with its image capture boards. The format was taken over by Truevision when it acquired the product line from AT&T. It is now commonly used for digitized images and also for high-quality images produced by ray tracers and other graphics applications.

It became a popular file format mainly because it was the first 24-bit truecolor format to come to the PC market. There are several varieties of Targa files; the most commonly used are the Targa 16, Targa 24, and Targa 32. The names are derived from the type of hardware used to create them.

The fixed-sized header information of the Targa format includes: the existence (or not) and colormap, location, size, pixel depth, image location, colormap (if it exists), and finally the image data itself.

Version 2.0 introduced a file footer that identifies it as the newest version and contains pointers to additional fields in two main structures: the "extension area" and the "developer directory". The extension area contains the addresses of many optional fields, one of the most popular being the "postage stamp image" (miniature of the main image).

The developer directory can be used to store proprietary information. Developers can register their own private fields with Truevision. A null-terminated ASCII string containing "TRUEVISION-XFILE.", and positioned at the end of the file, indicates that the footer is valid.

Targa defines 3 color methods: pseudo color, direct color, and truecolor. Pseudo color uses an index to a color palette. Direct color is like pseudo color except that the RGB components are looked up separately. In truecolor files, the color information is stored directly in the image data. The palettes used by Targa files are variable in size; they do not necessarily correlate to the bit depth of the image. The presence of a palette does not always mean that it is used to display the image.

References Used

Brown, C. Wayne, and Barry J. Shepherd. Graphics File Formats: Reference and Guide. Greenwich, CT.: Manning Publications, 1992.

Kay, David C. and John R. Levine. Graphics File Formats. Windcrest Books, 1992.

Murray, James D. and William vanRyper. Encyclopedia of Graphics File Formats. Sebastopol, CA: O'Reilly & Associates, Inc., 1994.