TGA

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Identification)
 
(31 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{|
 
|[[File Formats]]
 
| >
 
|[[Electronic File Formats]]
 
| >
 
|[[Graphics]]
 
| >
 
|[[TGA]]
 
|}
 
 
 
{{FormatInfo
 
{{FormatInfo
 
|formattype=electronic
 
|formattype=electronic
 
|subcat=Graphics
 
|subcat=Graphics
|extensions={{ext|tga}}
+
|extensions={{ext|tga}}, {{ext|icb}}, {{ext|vda}}, {{ext|vst}}
|pronom={{PRONOM|fmt/402}}
+
|locfdd={{LoCFDD|fdd000179}}, {{LoCFDD|fdd000180}}
 +
|pronom={{PRONOM|x-fmt/367}}, {{PRONOM|fmt/402}}
 +
|wikidata={{wikidata|Q1063976}}
 +
|released=1984
 +
|kaitai struct=tga
 
}}
 
}}
 +
'''TGA''' ('''Targa''') is a raster image file format developed by Truevision, Inc. (then named EPICenter) in 1984. Designed for use with MS-DOS color applications, TGA is the native format of Truevision's TARGA (Truevision Advanced Raster Graphics Adapter) boards, which were some of the first graphic cards for IBM-compatible PCs to support 24-bit RGB color encoding (sometimes termed ''truecolor'').
  
A simple raster format for individual images first established by Truevision, Inc. in 1984. Designed for use with MS-DOS color applications, TGA is the native format of Truevision's TARGA (Truevision Advanced Raster Graphics Adapter) boards, which were some of the first graphic cards for IBM-compatible PCs to support 24-bit RGB color encoding (sometimes termed ''truecolor'').
+
Most TGA files are quite simple, but the format has the potential to be fairly complex.
  
== Sample images ==
+
TGA images are either uncompressed, or compressed with [[run-length encoding]].
* [http://www.fileformat.info/format/tga/sample/index.htm TGA Sample Files]
+
  
== References ==
+
== Format details ==
* [http://en.wikipedia.org/wiki/Truevision_TGA Truevision TGA: Wikipedia]  
+
Files begin with an 18-byte fixed header, sometimes followed by other segments, followed by the pixel data. After the pixel data, there may be additional data elements referred to by an optional 26-byte file footer.
* [http://www.digitalpreservation.gov/formats/fdd/fdd000179.shtml Truevision TGA, version 1.0, from Library of Congress resource on Sustainability of Digital Formats]
+
 
* [http://www.fileformat.info/format/tga/egff.htm TGA File Format Summary] From Encyclopedia of Graphics File Formats at FileFormat.Info (1996)
+
== Variant formats ==
 +
Some Truevision products used their own variant or subset of TGA: '''ICB''', '''VDA''', or '''VST'''. Those and other TGA variants are listed here.
 +
 
 +
=== ICB ===
 +
* File extension: '''.icb'''
 +
* Full name: '''Image Capture Board'''
 +
 
 +
=== VDA ===
 +
* File extension: '''.vda'''
 +
* Full name: '''Video Display Adapter'''
 +
 
 +
=== VST ===
 +
* File extension: '''.vst'''
 +
* Full name: '''TrueVista''' or '''Truevision Vista'''
 +
 
 +
[[XnView]] can read and write VST format. The format XnView supports seems to have more differences from TGA than are mentioned in the TGA 2.0 specification. There is an extra 18-byte header or ID field after the main header, with the signature "{{magic|IGCH}}" at file offset 20.
 +
 
 +
=== PIX, BPX ===
 +
* File extensions: '''.pix''', '''.bpx'''
 +
 
 +
Refer to [[Lumena PIX/BPX]].
 +
 
 +
=== IVB ===
 +
* File extension: '''.ivb'''
 +
 
 +
No details known. IVB is a file extension or variant format that [[XnView]] claims to support.
 +
 
 +
== Identification ==
 +
TGA files have no signature at the beginning of the file. They can be identified fairly reliably by testing whether the first 18 bytes have sensible values for TGA format, but that is nontrivial.
 +
 
 +
Some, but not all, TGA files have a signature at the ''end'' of the file. In that case, the last 18 bytes of the file are the ASCII characters "<code>TRUEVISION-XFILE.</code>", followed by a NUL byte (<code>0x00</code>). An example of a file ending in <code>TRUEVISION-XFILE.[0x00]</code> is seen at {{DexvertSamples|image/tga}} (linked below in &sect;Sample files) > https://sembiance.com/fileFormatSamples/image/tga/test.tga.
 +
 
 +
== Versions ==
 +
The first TGA format is now known as ''Original TGA Format'', or (informally) ''TGA Version 1''. It is characterized by the lack of a ''New TGA Format'' signature.
 +
 
 +
''New TGA Format'', or ''TGA Version 2.0'', was released in 1989. It is characterized by a footer with a "TRUEVISION-XFILE" signature. It adds an optional "Extension Area" segment, with many standard metadata fields.
 +
 
 +
It also adds an optional "Developer Area" segment, which supports arbitrary custom data. A custom data item is tagged with a 16-bit integer identifier, similar to a [[TIFF]] tag. There does not appear to be any published list of TGA tags, though tag 20 seems to be used for [[Photoshop Image Resources]].
 +
 
 +
== Specifications ==
 +
* Truevision TGA File Format Specification, Version 2.0: [http://googlesites.inequation.org/tgautilities PostScript] · [http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf PDF] · [http://www.ludorg.net/amnesia/TGA_File_Format_Spec.html HTML]
 
* [http://www.martinreddy.net/gfx/2d/TGA.txt Information extracted by Martin Reddy from Appendix C of the Truevision Technical Guide]
 
* [http://www.martinreddy.net/gfx/2d/TGA.txt Information extracted by Martin Reddy from Appendix C of the Truevision Technical Guide]
 +
* [http://www.textfiles.com/programming/FORMATS/targafor.pro Another copy of the file]
 +
* [http://www.textfiles.com/programming/FORMATS/pix_fmt.txt Picture format docs (of a number of formats including this one)]
 +
 +
== Software ==
 +
TGA is widely supported. Software listed here has been semi-arbitrarily selected.
 +
* [[Netpbm]]: pamtotga, tgatoppm
 +
* [[ImageMagick]]
 +
* [[FFmpeg]]
 +
* [[XnView]]
 +
* [http://tgalib.sourceforge.net/ Libtga]
 +
* {{Deark}}
 +
* [http://snisurset.net/code/abydos/ abydos]
 +
* [[GIMP]]
 +
 +
== Sample files ==
 +
* http://www.fileformat.info/format/tga/sample/index.htm
 +
* https://samples.libav.org/image-samples/TGA/
 +
* http://links.uwaterloo.ca/Repository/TGA/
 +
* http://downloads.oldschoolbg.com/cstrike/gfx/env/
 +
* https://github.com/timfel/tombexcavator/tree/master/data/TGA
 +
* {{DexvertSamples|image/tga}}
 +
 +
== Links ==
 +
* [[Wikipedia:Truevision TGA|Truevision TGA: Wikipedia]]
 +
* {{EGFF|tga|TGA File Format Summary}}, from the [[Encyclopedia of Graphics File Formats]]
 +
* [http://www.paulbourke.net/dataformats/tga/ Creating TGA Image files] By Paul Bourke, 1996.
 +
* [https://twitter.com/angealbertini/status/535565222652948480/photo/1 TGA format chart]

Latest revision as of 04:40, 28 December 2023

File Format
Name TGA
Ontology
Extension(s) .tga, .icb, .vda, .vst
LoCFDD fdd000179, fdd000180
PRONOM x-fmt/367, fmt/402
Wikidata ID Q1063976
Kaitai Struct Spec tga.ksy
Released 1984

TGA (Targa) is a raster image file format developed by Truevision, Inc. (then named EPICenter) in 1984. Designed for use with MS-DOS color applications, TGA is the native format of Truevision's TARGA (Truevision Advanced Raster Graphics Adapter) boards, which were some of the first graphic cards for IBM-compatible PCs to support 24-bit RGB color encoding (sometimes termed truecolor).

Most TGA files are quite simple, but the format has the potential to be fairly complex.

TGA images are either uncompressed, or compressed with run-length encoding.

Contents

[edit] Format details

Files begin with an 18-byte fixed header, sometimes followed by other segments, followed by the pixel data. After the pixel data, there may be additional data elements referred to by an optional 26-byte file footer.

[edit] Variant formats

Some Truevision products used their own variant or subset of TGA: ICB, VDA, or VST. Those and other TGA variants are listed here.

[edit] ICB

  • File extension: .icb
  • Full name: Image Capture Board

[edit] VDA

  • File extension: .vda
  • Full name: Video Display Adapter

[edit] VST

  • File extension: .vst
  • Full name: TrueVista or Truevision Vista

XnView can read and write VST format. The format XnView supports seems to have more differences from TGA than are mentioned in the TGA 2.0 specification. There is an extra 18-byte header or ID field after the main header, with the signature "IGCH" at file offset 20.

[edit] PIX, BPX

  • File extensions: .pix, .bpx

Refer to Lumena PIX/BPX.

[edit] IVB

  • File extension: .ivb

No details known. IVB is a file extension or variant format that XnView claims to support.

[edit] Identification

TGA files have no signature at the beginning of the file. They can be identified fairly reliably by testing whether the first 18 bytes have sensible values for TGA format, but that is nontrivial.

Some, but not all, TGA files have a signature at the end of the file. In that case, the last 18 bytes of the file are the ASCII characters "TRUEVISION-XFILE.", followed by a NUL byte (0x00). An example of a file ending in TRUEVISION-XFILE.[0x00] is seen at dexvert samples — image/tga (linked below in §Sample files) > https://sembiance.com/fileFormatSamples/image/tga/test.tga.

[edit] Versions

The first TGA format is now known as Original TGA Format, or (informally) TGA Version 1. It is characterized by the lack of a New TGA Format signature.

New TGA Format, or TGA Version 2.0, was released in 1989. It is characterized by a footer with a "TRUEVISION-XFILE" signature. It adds an optional "Extension Area" segment, with many standard metadata fields.

It also adds an optional "Developer Area" segment, which supports arbitrary custom data. A custom data item is tagged with a 16-bit integer identifier, similar to a TIFF tag. There does not appear to be any published list of TGA tags, though tag 20 seems to be used for Photoshop Image Resources.

[edit] Specifications

[edit] Software

TGA is widely supported. Software listed here has been semi-arbitrarily selected.

[edit] Sample files

[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox