PNG to TGA
Targa is still the texture format of choice for a lot of game tooling, older 3D packages and Source-engine pipelines, mostly because it is trivially simple to parse and stores alpha without any fuss. This writes proper TGA files — bottom-up BGRA rows, an 18-byte header and a TGA 2.0 footer — from any image your browser can open.
Drop images here
PNG, JPG, WebP, GIF — multiple files allowed
24-bit or 32-bit
Pick 32-bit whenever the source has any transparency. TGA stores the alpha channel as a fourth byte per pixel and declares its depth in the header's attribute bits, which is how a texture loader knows to use it as a mask rather than as padding. Choose 24-bit only when you know the consumer ignores alpha, because there is nowhere for it to go — transparent pixels are composited onto white on the way out, which is visible as a white fringe if the image had soft edges.
One long-standing quirk: some older tools read 32-bit TGA alpha as an opacity channel and others as a transparency channel, so an image can arrive inverted. If that happens, it is the reader rather than the file, and Invert alpha gives you a version that satisfies it.
What RLE actually saves
TGA's run-length encoding works one row at a time: a repeated pixel becomes a two-byte run packet, and anything else is copied verbatim with a one-byte length prefix. On flat art — UI elements, pixel art, sprite sheets with lots of empty space — that routinely cuts the file by half or more. On a photograph it saves nothing and can add up to a byte per 128 pixels, because no two neighbours are ever quite identical.
RLE is part of the base spec, not an extension, so any reader that handles TGA at all handles type 10. If you are targeting something ancient enough that you are unsure, leave it off — uncompressed TGA is about as universally readable as an image file gets.
FAQ
Why are TGA rows stored bottom-up?
Because Targa was designed for framebuffers that filled from the bottom of the screen upward. The header has an "origin" bit that can flip it, but bottom-up with the bit clear is what virtually everything expects, so that is what gets written here.
Is the file 16-bit or paletted TGA?
Neither — the output is always true colour, 24 or 32 bits per pixel. The 16-bit and colour-mapped TGA variants exist but are rarely what a modern pipeline wants. For a paletted image with a real size saving, indexed PNG compresses far better than a paletted TGA would.
Can Photoshop and Blender open these?
Yes, along with GIMP, Krita, ImageMagick, Unity, Unreal and the Source SDK tools. TGA's simplicity is exactly why it survived — the entire format description fits on a couple of pages.
Does it write the TGA 2.0 footer?
Yes, the 26-byte footer with the TRUEVISION-XFILE. signature. A few readers check for it to decide whether extension data is present; writing it costs nothing and avoids the question.