[PDF] Truevision TGA File Format Specification v2.0

targa-sigma-collective-www-sigmaco-org

The success of the TGA File Format for storing color images can be attributed to its ease of use, the small amount of program memory needed to parse the file, and the fact that it was the first truecolor file format widely available. Truevision defined the TGA file format in 1984 for use with its first videographics products. Since then, it has been estimated that today over 80 percent of the color images stored on hard drives employ some variation of the TGA file format. Many government offices, corporations, service bureaus, production shops and nearly all Truevision developers have standardized on the TGA format as a means of allowing cross-product and crossapplication compatibility. Truevision recommends that this format be used by all software developed for Truevision products since it allows customers flexibility in combining many
applications together to provide a total solution to meet their needs.

The original Truevision TGA File Format has been widely accepted by the graphics industry. However, newer technology and techniques have created the need for additional image information to be recorded in the file. In 1989, Truevision introduced extensions to the TGA File Format to satisfy requests made by the graphics industry and to ensure that the standard will meet future needs of the color imaging marketplace. The extensions are optional and will have no impact on existing packages (assuming the packages followed the original TGA File Format guidelines). In particular, the new TGA File Format addresses the following needs:

  • The inclusion of a scaled-down “postage stamp” copy of the image
  • Date and Time of image file creation
  • Author Name
  • Author Comments
  • Job Name
  • Job Accumulated Time
  • Gamma Value
  • Correct Color LUT
  • Pixel Aspect Ratio
  • Scan Line Offset Table
  • Key Color
  • Software Package Name and Version Number
  • Developer Definable Areas
  • Attribute (Alpha) channel Type
  • The ability for simple expansion

 

INTRODUCTION ………………………………………………………………………………….1
DEFINITIONS ………………………………………………………………………………………2
TGA FILE FORMAT SPECIFICATION …………………………………………………….4
TGA FILE HEADER ……………………………………………………………………………..6
ID Length – Field 1 (1 byte):…………………………………………………………………………….6
Color Map Type – Field 2 (1 byte): …………………………………………………………………..6
Image Type – Field 3 (1 byte): …………………………………………………………………………6
Color Map Specification – Field 4 (5 bytes): …………………………………………………….7
Image Specification – Field 5 (10 bytes): …………………………………………………………8
IMAGE/COLOR MAP DATA…………………………………………………………………10
Image ID – Field 6 (variable): …………………………………………………………………………10
Color Map Data – Field 7 (variable):……………………………………………………………….10
Image Data – Field 8 (variable):……………………………………………………………………..10
DEVELOPER AREA ……………………………………………………………………………11
Developer Data – Field 9 (variable):……………………………………………………………….11
EXTENSION AREA …………………………………………………………………………….13
Extension Size – Field 10 (2 Bytes): ………………………………………………………………13
Author Name – Field 11 (41 Bytes): ……………………………………………………………….13
Author Comments – Field 12 (324 Bytes): ……………………………………………………..13
Date/Time Stamp – Field 13 (12 Bytes):………………………………………………………….14
Job Name/ID – Field 14 (41 Bytes): ………………………………………………………………..14
Job Time – Field 15 (6 Bytes): ……………………………………………………………………….14
Software ID – Field 16 (41 Bytes): ………………………………………………………………….15
Software Version – Field 17 (3 Bytes): …………………………………………………………..15
Key Color – Field 18 (4 Bytes):………………………………………………………………………15
Pixel Aspect Ratio – Field 19 (4 Bytes): …………………………………………………………16
Gamma Value – Field 20 (4 Bytes): ………………………………………………………………..16
Color Correction Offset – Field 21 (4 Bytes):………………………………………………….16
Postage Stamp Offset – Field 22 (4 Bytes): ……………………………………………………16
Scan Line Offset – Field 23 (4 Bytes): ……………………………………………………………17
Attributes Type – Field 24 (1 Byte): ……………………………………………………………….17
Scan Line Table – Field 25 (Variable): ……………………………………………………………18
Postage Stamp Image – Field 26 (Variable): ………………………………………………….18
Color Correction Table – Field 27 (2K Bytes): ………………………………………………..18
TGA FILE FOOTER…………………………………………………………………………….19
Byte 0-3 – Extension Area Offset – Field 28 ……………………………………………………19
Byte 4-7 – Developer Directory Offset – Field 29 …………………………………………….19
Byte 8-23 – Signature – Field 30 …………………………………………………………………….20
Byte 24 – Reserved Character – Field 31 ………………………………………………………..20
Byte 25 – Binary Zero String Terminator – Field 32 …………………………………………20
IMAGE TYPES …………………………………………………………………………………..21
DATA TYPE 1 – COLOR-MAPPED IMAGES ……………………………………………………21
DATA TYPE 2 – TRUE-COLOR IMAGES …………………………………………………………21
DATA TYPE 3 – BLACK AND WHITE (UNMAPPED) IMAGES …………………………..22
DATA TYPE 9 – RUN-LENGTH ENCODED (RLE), COLOR-MAPPED IMAGES …..22
Page 4
TABLE OF CONTENTS
DATA TYPE 10 – RUN-LENGTH ENCODED (RLE), TRUE-COLOR IMAGES………23
DATA TYPE 11 – RUN-LENGTH ENCODED (RLE), ………………………………………….23
BLACK AND WHITE IMAGES………………………………………………………………………..23
RUN-LENGTH ENCODING OF IMAGES……………………………………………….24
Run-Length Packet:……………………………………………………………………………………..25
Raw Packet (i.e., Non-Run-Length Encoded):……………………………………………….26

Grátis – DOWNLOAD
SIGMA Co. 🇧🇷

SIGMA Co. 🇧🇷