Monday, December 23, 2024
Home » How to Tips » What is Truevision TGA File Format (New Version)

What is Truevision TGA File Format (New Version)

  author
Written By Nimisha Ramesh
Mack John
Approved By Mack John  
Published On November 26th, 2016
Reading Time 6 Minutes Reading

What is TGA File Format : Definition

Generally, TGA file extensions are related to TARGA image files which stands for Truevision Advanced Raster Graphics Adapter. This TGA file format is used to describe bitmap images that were formerly capable of representing bitmaps ranging from black to white, indexed color, RGB color, and the format also supports various compression methods. It is developed for the use of Truevision’s high-end graphic cards that were designed for the purpose of video editing. Moreover, in the animation and video industry, images with TGA file type are commonly viewed. Additionally, the developers of high-end computer games make use of TGA file formats to store the file texture by 3D video games.

Technical Details of TGA File Type

The TGA file extension can be saved in the raster graphic format which is designed by Truevision. It has supported several ranges of bits such as 8, 16, 24 and 32 bits per pixel at a maximum range of 24 bits for RGB colors and 8-bit alpha channel. Each available color in the image is represented by using the palette. It depends on the depth of the color, every pixel within the image is characterized by a particular number of bits. This is the major reason due to which TGA image files have large in size just an effective use of lossless run-length encoding, the file size may be compressed for reducing the size of file properly.

More Description About TGA File

Developer Truevision
Colors 8-bit, 16-bit, 24-bit, 32-bit
Platform MS-Doc, Windows, UNIX
Type Bitmap
Category Raster Image Files
Format Binary
MIME Type image/x-targa, image/x-tga
File Format .tga

 

TGA File structure

The original TGA file format is organized as follows:

  • File Header Contains information on the image data and palette
  • Image Identification field is optional
  • Color Map is optional
  • Bitmap data

The new .tga file format contains all the structure which includes in original TGA format and even appends various data structures in the ending of the original TGA file format. The below structures might follow the bitmap data:

  • Developer directory is optional which consists a variable number of tags point out the piece of information saved in TGA file
  • Developer Area(Optional)
  • Extension Area(Optional) that contains the details finding in the header of bitmap file
  • Color correction table is Optional
  • Scan line table(Optional)
  • TGA image contains a Footer, which identifies the extension as well as developer areas as a new .tga file extension.

As users can view both new as well as original TGA file extension those are identical in structure from the header to the image area. Due to this reason, applications are able to read either original TGA File format images or new .tga file extension without any issue. All information passing after the file image then, data may be avoided.

Discussing TGA File Specification

The .tga file format specification has taken from Truevision. The .tgs file format is a little bit complex, but the description in Truevision’s specification makes it more easy and understandable. Also, Truevision distributes on the floppy disk which contains multiple utilities and C source code that is used to manipulate both .tga file type and Targa file format video graphics display adapters.

TGA File Type in Detail

To describe multiple components of a TGA file type in detail. Those are mentioned below:

  • Header

TGA header has 18 bytes in length and is identical in both editions of the TGA format.

  • Image ID

This field is an optional field which may appear instantly after the TGA file header. The Image ID field stores information that helps to identify the image in some style i.e., filename, author name, serial number, etc. This field can’t be NULL-terminated, even it must be if it is used to save string data. The field size is indicated by the value of the IDLength field inside the header. This value has been in the range 0 to 255 and value of 0 signifies that in TGA file there is not any Image ID field present.

  • Colormap

The TGA format gives three methods to arrange image data like Pseudocolor, direct- color and true color.

  • Image Data Encoding

Image data stored within a TGA file which is encoded. Only because of this reason, TGA file tends to be quite big, especially when the bitmap data range is heavy around 24 or 32 bits.

  • Image Data

Mostly, image data is remunerated in the following header, still, may happen after a palette or Image ID field if these are existing in the TGA file format. Thus, make sure never read image data items from a TGA format without confirming the presence of palette and Image ID fields. Else, a user may suffer. The size of TGA image is slightly 65,535 pixels high.

  • Pixel Attribute Bits

Targa file format display adapters which include a designation that shows the number of bits per pixel holds to store the data for Targa file format 16 and 24 bit but not for Targa 32 and 64 bit.

The New TGA Format

New Version combines several features to the original TGA file type, which helps to increase the amount of TGA information. The original TGA file format is the simplest and easiest way that can be implemented quickly in the software. However, it does not need additional features by developers that are found in some other image file formats.

  • Footer
    The length of the footer is 24 bytes and it consists total three fields like ExtensionOffset, DeveloperOffset, and TGA signature.
  • Developer Area
    The Developer Area starts with a directory which helps to resemble the structure of the Image File Directory found in the TIFF file format. The size of this field is two bytes. The offset value of this field is stored within the footer.
  • Extension Area
    The offset value of the Extension Area is saved inside the TGA footer. The size of the Extension Area is 495 bytes.
  • Scan-line Table and color Correction table

The new TGA format contains three data structures like scan-line table, postage-stamp image and color correction table. Only one out of these data structures per TGA format and offsets of these structures will appear in the Extension area.

Conclusion

TGA file extension is the most significant bitmap files that can be opened by image editing software through Microsoft paint to Adobe Photoshop. Understanding the various aspects of the file, we have presented entire necessary details to let the users understand what is TGA file format and its file structure. Also, we have discussed TGA file specification in detail.