Clean TGA (Truevision TARGA) Files
15 A format with a genuinely unusual detection problem
TGA (Truevision TARGA) is an older format still very much alive in game development and visual-effects
texture pipelines. It carries none of the camera/GPS metadata risk this site covers for photos - TGA
isn't something a phone produces - but it has a real, specific technical quirk worth knowing if you
ever wonder why a .tga file might get rejected here.
Go deeper: why classic TGA can't be identified the way every other format here is
Every other format on this site is identified by a magic-byte signature at the very start of the
file - PNG's 8-byte header, JPEG's FF D8 FF, and so on. Classic TGA has no such thing:
its header is just a sequence of numeric fields (image dimensions, color depth, origin) with no
signature bytes at all, which means a generic decoder has no reliable, content-based way to tell a
valid TGA file apart from random binary data with the right byte lengths in the right places -
exactly the kind of ambiguity this site's whole approach refuses to paper over by trusting a file
extension instead. The practical fix: TGA 2.0 added an optional footer - the literal ASCII text
TRUEVISION-XFILE. near the very end of the file - which is a real, unambiguous
signature. This tool deliberately only recognizes TGA files carrying that footer. Older TGA 1.0
files without it are refused as unrecognized rather than guessed at, even though that means some
genuinely valid, very old TGA files won't be accepted - the same "don't trust the extension, ever"
principle applied consistently, even when it costs a few legitimate files at the margin.
If your TGA file gets rejected
The most likely explanation is exactly the one above: a TGA 1.0 file with no TGA 2.0 footer, which this tool can't distinguish from arbitrary bytes with any real confidence - not a bug, and not specific to this file. Re-exporting the file from whatever tool produced it, or converting it to a format with an actual signature (PNG is a safe default), sidesteps the issue entirely, and either way it'll go through the exact same full decode-and-rebuild guarantee described on the comparison page.