Chip in

TGA file format (.tga)

Truevision raster, common in games and 3D tools.

Last updated

What is a TGA file?

In short: A TGA file (.tga) is an image file in the TGA format. TGA stores pixels with an optional simple run-length compression and full alpha support. It can be converted to JPG, PNG or WEBP for free in a web browser with iHateFiles, without uploading it.

Created by Truevision in 1984 for their TARGA graphics cards, the first that could show photographic images on a PC.

TGA stores pixels with an optional simple run-length compression and full alpha support. It has stayed alive for four decades because it is easy to read, lossless, and handles transparency, which suits game textures and 3D rendering pipelines.

What TGA is good at

  • Lossless with a proper alpha channel
  • Simple enough that any tool can read it reliably
  • Still standard in game engines and 3D software

Where TGA falls short

  • Files are large; the compression is very basic
  • Browsers do not display it
  • Very little metadata

When to use TGA

Use TGA when a game engine or 3D application asks for it. Otherwise PNG does the same job in less space.

How to open a TGA file

Game engines, 3D software and most image editors. Not browsers.

Opening a .tga file on each platform
WindowsIrfanView or GIMP. Nothing built into Windows opens Targa.
macOSPreview opens most TGA files. GIMP handles the RLE-compressed ones Preview refuses.
LinuxGIMP and ImageMagick.
PhoneNeeds a dedicated viewer.
In a browserNo browser displays TGA.

The thing that usually goes wrong

Older TGA files carry no signature at all, so nothing can identify one except by its extension. Files written here include the version 2 footer so they can be recognised.

Inside a TGA file

Truevision TGA was designed in 1984 for the TARGA graphics cards, which were among the first that could display photographic colour on a PC. The format outlived the hardware by four decades because it is trivially simple to write: a short header, then pixels, with optional run-length encoding that a programmer can implement in an afternoon.

That simplicity is why it survives in game development. Texture pipelines want a format with a straightforward alpha channel and no surprises, and TGA has both. Older id Software and Valve engines used it throughout, and plenty of modding communities still do.

Two things catch people out. TGA stores pixels bottom-up by default, so a decoder that ignores the orientation bit produces an upside-down image. And the run-length encoding is optional, so two files with the same extension can have wildly different sizes for identical pictures.

TGA at a glance
Full nameTruevision TGA, or TARGA
Introduced1984, for Truevision graphics cards
Colour depth8, 15, 16, 24 or 32 bits per pixel
AlphaYes, in the 32-bit form
CompressionOptional run-length encoding, or none
Row orderBottom-up by default — the usual cause of flipped output

Questions

What is a TGA file?

Truevision raster, common in games and 3D tools. Files use the .tga extension.

How do I open a TGA file?

Most image software opens TGA directly. If yours does not, convert it here to something more common. It takes a few seconds and nothing is uploaded.

Can I convert TGA for free?

Yes. Every conversion here is free and unlimited, because your own device does the work rather than a server we have to pay for.

Is TGA lossless?

Yes. TGA stores every pixel exactly, at the cost of a larger file.