Truevision TGA
Encyclopedia
Truevision TGA, often referred to as TARGA, is a raster
Raster graphics
In computer graphics, a raster graphics image, or bitmap, is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium...

 graphics file format created by Truevision Inc.
Truevision
Truevision, Inc. was a maker of digital video processing add-on boards for PC computers. It was founded by Cathleen Asch, Carl Calabria, Joseph Haaf, Bryan Hunt, Brad Pillow, Joe Shepard and Jeff Walters and others when AT&T split off their Electronic Photography and Imaging Center in 1987...

 (now acquired by Avid Technology
Avid Technology
Avid Technology, Inc. is an American company specializing in video and audio production technology; specifically, digital non-linear editing systems, management and distribution services. It was created in 1987 and became a publicly traded company in 1993...

). It was the native format of TARGA and VISTA boards, which were the first graphic card
Graphics processing unit
A graphics processing unit or GPU is a specialized circuit designed to rapidly manipulate and alter memory in such a way so as to accelerate the building of images in a frame buffer intended for output to a display...

s for IBM-compatible PCs
IBM PC compatible
IBM PC compatible computers are those generally similar to the original IBM PC, XT, and AT. Such computers used to be referred to as PC clones, or IBM clones since they almost exactly duplicated all the significant features of the PC architecture, facilitated by various manufacturers' ability to...

 to support Highcolor/truecolor display. This family of graphic cards was intended for professional computer image synthesis and video editing with PCs; for this reason, usual resolutions of TGA image files match those of the NTSC
NTSC
NTSC, named for the National Television System Committee, is the analog television system that is used in most of North America, most of South America , Burma, South Korea, Taiwan, Japan, the Philippines, and some Pacific island nations and territories .Most countries using the NTSC standard, as...

 and PAL
PAL
PAL, short for Phase Alternating Line, is an analogue television colour encoding system used in broadcast television systems in many countries. Other common analogue television systems are NTSC and SECAM. This page primarily discusses the PAL colour encoding system...

 video formats.

TARGA is an acronym for Truevision Advanced Raster Graphics Adapter; TGA is an initialism for Truevision Graphics Adapter.

TGA files commonly have the extension
Filename extension
A filename extension is a suffix to the name of a computer file applied to indicate the encoding of its contents or usage....

 ".tga" on PC DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

/Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 systems and Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 (older Macintosh
Macintosh
The Macintosh , or Mac, is a series of several lines of personal computers designed, developed, and marketed by Apple Inc. The first Macintosh was introduced by Apple's then-chairman Steve Jobs on January 24, 1984; it was the first commercially successful personal computer to feature a mouse and a...

 systems use the "TPIC" type code
Type code
A type code is the only mechanism used in pre-Mac OS X versions of the Macintosh operating system to denote a file's format, in a manner similar to file extensions in other operating systems. Codes are four-byte OSTypes...

). The format can store image data with 8, 16, 24, or 32 bit
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...

s of precision per pixel
Pixel
In digital imaging, a pixel, or pel, is a single point in a raster image, or the smallest addressable screen element in a display device; it is the smallest unit of picture that can be represented or controlled....

 – the maximum 24 bits of RGB and an extra 8-bit alpha channel. Color data can be color-mapped
Palette (computing)
In computer graphics, a palette is either a given, finite set of colors for the management of digital images , or a small on-screen graphical element for choosing from a limited set of choices, not necessarily colors .Depending on the context In computer graphics, a palette is either a given,...

, or in direct color or truecolor format. Image data may be stored raw, or optionally, a lossless PackBits
PackBits
PackBits is a fast, simple lossless compression scheme for run-length encoding of data.Apple introduced the PackBits format with the release of MacPaint on the Macintosh computer. This compression scheme is one of the types of compression that can be used in TIFF-files...

 RLE compression
Run-length encoding
Run-length encoding is a very simple form of data compression in which runs of data are stored as a single data value and count, rather than as the original run...

 can be employed.

TGA files are in widespread use due to their simplicity and ease of implementation and lack of encumbering patents.

The compression method used in Targa images (Run Length Encoding) performs poorly when compressing images with many color variations, such as digital photos, but works well for textures and simpler images.

History

The TGA file format was originally defined and specified by AT&T EPICenter with feedback from Island Graphics Inc in 1984. AT&T EPICenter was an internal spin-off of AT&T created to market new technologies AT&T had developed for color frame buffers. What later became Truevision was the result of a leveraged employee buyout from AT&T in 1987.

EPICenter's first two cards, the VDA (video display adapter) and ICB (image capture board), used the first incarnations of the TGA file format. The file extensions ".vda" and ".icb" implied information about the board specific data contained.

It was later determined by Alan Wlasuk (then head of EPICenter), Brad Pillow (EPICenter) and Steven Dompier (Island's president) that a more codified file format was needed. The file format was created and implemented by Brad Pillow (EPICenter) and Bryan Hunt (EPICenter) and was developed in response to this need for a less board specific file format. A very simple extension was made to what was already in use, and contained information on width, height, pixel depth, an associated color map and image origin. A label field (up to 255 characters) was also included in the initial spec, but was rarely used.

At the time, another technically superior file format called TIFF also appeared, but its use for true color images was very limited as the implementation and sharing of files between applications supporting the TIFF specification was rather difficult and involved. The TGA file format's simplistic nature and portability between platforms is the main reason for its widespread adoption and its continued success in a wide variety of applications worldwide to this day.

Initially the TGA file format was used in the ICB-PAINT and TARGA-PAINT programs (what later became known as TIPS) and for several projects in online real estate browsing and still-frame video teleconferencing.

The current version (2.0) includes several enhancements such as "postage stamps" (better known as thumbnail
Thumbnail
Thumbnails are reduced-size versions of pictures, used to help in recognizing and organizing them, serving the same role for images as a normal text index does for words...

s), an alpha channel
Alpha compositing
In computer graphics, alpha compositing is the process of combining an image with a background to create the appearance of partial or full transparency. It is often useful to render image elements in separate passes, and then combine the resulting multiple 2D images into a single, final image in a...

, gamma value, and textual metadata
Metadata
The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

, and was authored by Truevision Inc.'s Shawn Steiner with direction from Kevin Friedly and David Spoelstra in 1989.

At the time of its launching, it represented the state-of-the-art in digital image processing. Even today, though its maximum color depth
Color depth
In computer graphics, color depth or bit depth is the number of bits used to represent the color of a single pixel in a bitmapped image or video frame buffer. This concept is also known as bits per pixel , particularly when specified along with the number of bits used...

 is not well suited for high-end pre-press, intensive image processing systems, TGA is still used extensively throughout the animation
Animation
Animation is the rapid display of a sequence of images of 2-D or 3-D artwork or model positions in order to create an illusion of movement. The effect is an optical illusion of motion due to the phenomenon of persistence of vision, and can be created and demonstrated in several ways...

 and video
Video
Video is the technology of electronically capturing, recording, processing, storing, transmitting, and reconstructing a sequence of still images representing scenes in motion.- History :...

 industry because its primary intended outputs are standard TV screens, not color printed pages.

Uncompressed 24-bit TGA images are relatively simple compared to several other prominent 24-bit storage formats: A 24-bit TGA contains only an 18-byte header followed by the image data as packed RGB data. In contrast, BMP requires padding rows to 4-byte boundaries, TIFF
Tagged Image File Format
TIFF is a file format for storing images, popular among graphic artists, the publishing industry, and both amateur and professional photographers in general. As of 2009, it is under the control of Adobe Systems...

 and PNG are metadata
Metadata
The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

 containers that do not place the image data or attributes at a fixed location within the file.

32-bit TGA images contain an alpha channel, or key signal, and they are used in character generator programs such as Avid Deko.

Technical details

All values are little-endian
Endianness
In computing, the term endian or endianness refers to the ordering of individually addressable sub-components within the representation of a larger data item as stored in external memory . Each sub-component in the representation has a unique degree of significance, like the place value of digits...

; field and subfield numbers are per Version 2.0 of the specification.

Version 2 added the extension area and footer. The developer area exists to store application-specific information.

Header

Field no. Length Field name Description
1 1 byte ID length Length of the image ID field
2 1 byte Color map type Whether a color map is included
3 1 byte Image type Compression and color types
4 5 bytes Color map specification Describes the color map
5 10 bytes Image specification Image dimensions and format


Image ID length (field 1)

0 - 255
The number of bytes that the image ID field consists of.
The image ID field can contain any information, but it is common for it to contain the date and time the image was created or a serial number.

As of version 2.0 of the TGA spec, the date and time the image was created is catered for in the extension area.

Color map type (field 2)

has the value:
  • 0 if image file contains no color map
  • 1 if present
  • 2-127 reserved by Truevision
  • 128-255 available for developer use


Image type (field 3)

is enumerated in the lower three bits, with the fourth bit as a flag for RLE. Some possible values are:
  • 0 no image data is present
  • 1 uncompressed color-mapped image
  • 2 uncompressed true-color image
  • 3 uncompressed black-and-white image
  • 9 run-length encoded color-mapped image
  • 10 run-length encoded true-color image
  • 11 run-length encoded black-and-white Image


Color map specification (field 4)

has three subfields:
  • First entry index (2 bytes): offset into the color map table
  • Color map length (2 bytes): number of entries
  • Color map entry size (1 byte): number of bits per pixel


Image specification (field 5)

has six subfields:
  • X-origin (2 bytes): absolute coordinate of lower-left corner for displays where origin is at the lower left
  • Y-origin (2 bytes): as for X-origin
  • Image width (2 bytes): width in pixels
  • Image height (2 bytes): height in pixels
  • Pixel depth (1 byte): bits per pixel
  • Image descriptor (1 byte): bits 3-0 give the alpha channel depth, bits 5-4 give direction

Image and color map data

Field no. Length Field Description
6 From image ID length field Image ID Optional field containing identifying information
7 From color map specification field Color map data Look-up table containing color map data
8 From image specification field Image data Stored according to the image descriptor

Developer area

Version 1.0 of the TGA specification was very basic, and many developers had a need to store more information, and so opted to add on extra sections to their files, specific to their application only.

In Version 2.0 of the specification, these application-specific enhancements/extras are supported by the developer area. Only the offset and size of the developer area are relevant to the spec, and developers are free to add whatever they want in the area.

If a TGA decoder cannot interpret the information in the developer area, it will generally ignore it, since it is assumed to have been created by a different application. It is recommended that developers build logic into their applications to determine whether the data in the developer area is compatible with the application; one step towards this is to check the software ID in the file footer.

Extension area

Field no. Length Field Description
10 2 bytes Extension size Size in bytes of the extension area, always 495
11 41 bytes Author name Name of the author. If not used, bytes should be set to NULL (\0) or spaces
12 324 bytes Author comment A comment, organized as four lines, each consisting of 80 characters plus a NULL
13 12 bytes Date/time stamp Date and time at which the image was created
14 41 bytes Job ID
15 6 bytes Job time Hours, minutes and seconds spent creating the file (for billing, etc.)
16 41 bytes Software ID The application that created the file.
17 3 bytes Software version
18 4 bytes Key color
19 4 bytes Pixel aspect ratio
20 4 bytes Gamma value
21 4 bytes Color correction offset Number of bytes from the beginning of the file to the color correction table if present
22 4 bytes Postage stamp offset Number of bytes from the beginning of the file to the postage stamp image if present
23 4 bytes Scan line offset Number of bytes from the beginning of the file to the scan lines table if present
24 1 byte Attributes type Specifies the alpha channel

File footer

If a TGA image contains a footer, the chances are that it is a TGA version 2 file. The footer is the final 26 bytes of the file, of which the last 18 are constant.
Field no. Length Field Description
28 4 bytes Extension offset Offset in bytes from the beginning of the file
29 4 bytes Developer area offset Offset in bytes from the beginning of the file
30 16 bytes Signature Contains "TRUEVISION-XFILE"
31 1 byte Contains "."
32 1 byte Contains NULL

Usage in video games

Historically, TGA was a common format for textures
Texture mapping
Texture mapping is a method for adding detail, surface texture , or color to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D. thesis of 1974.-Texture mapping:...

 in video games. Modern games are more likely to use compressed alternatives such as DirectDraw Surface
DirectDraw Surface
The DirectDraw Surface file format , from Microsoft, is a standard for storing data compressed with the lossy S3 Texture Compression algorithm, which can be decompressed in hardware by GPUs and consoles like the Playstation Portable, PlayStation 3 and Xbox 360...

, but due to its speed and simplicity TGA is often still used for saving screenshot
Screenshot
A screenshot , screen capture , screen dump, screengrab , or print screen is an image taken by a computer to record the visible items displayed on the monitor, television, or another visual output device...

s.

Other media

In the film Earth Girls Are Easy
Earth Girls Are Easy
Earth Girls Are Easy is a 1988 American musical comedy film directed by Julien Temple. It stars Geena Davis, Jeff Goldblum, Michael McKean, Julie Brown, Jim Carrey and Damon Wayans. The film is marketed with the tagline "An out-of-this-world, down-to-earth comedy adventure"...

, the aliens are given a makeover at the "Curl up and Dye" Salon. There is a short sequence showing the TARGA video card, and TIPS paint software in action.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK