PNG vs TGA: technical differences
To convert PNG to TGA, drop your PNG file into the converter above and download the TGA: an uncompressed 32-bit format with transparency, common in games and 3D tools. It is free, needs no sign-up, and runs in your browser, so the file is never uploaded.
TGA is one of the simplest image formats still in daily use: an 18-byte header followed by pixels. Pixohub writes 32-bit uncompressed TGA — blue, green, red, alpha for each pixel, with a top-left origin flag set in the header. Size is therefore fixed by dimensions: a 2048×2048 texture is about 16.8 MB, a 1024×1024 one about 4.2 MB, compared with a PNG that might be a few hundred kilobytes.
Transparency transfers fully: the PNG's alpha channel becomes TGA's 8-bit alpha. One subtle point for texture artists: browsers store canvas pixels with premultiplied alpha, so pixels that are completely transparent come out with their colour set to black (0,0,0). If your engine samples or mipmaps the texture, those black values can bleed into edges as a dark halo — the same thing that happens with many PNG exporters, and something to handle with edge padding ('dilation') in your texture tool.
| PNG (Portable Network Graphics) | TGA (Truevision TGA (Targa)) | |
|---|---|---|
| Compression | Lossless (DEFLATE with per-row prediction filters) | None or lossless RLE |
| Colour depth | 1–16 bits per channel; truecolor, greyscale or 256-colour palette | 8, 16, 24 or 32 bits per pixel |
| Transparency | Full 8/16-bit alpha channel | 8-bit alpha in 32-bit files |
| Animation | Only via the APNG extension | None |
| Metadata | Text chunks, ICC profile, gamma; EXIF via the newer eXIf chunk | Optional image ID and extension area |
| Typical file size | Large for photos (often 2–3× a JPG); tiny for flat graphics | Large — close to raw pixel size |
| Support | Universal — every browser, OS and editor | Game engines, 3D and video tools; browsers cannot display it |
When to convert PNG to TGA
Game modding and texture pipelines
Many modding tools and older engines expect textures as TGA before they compile them to an engine format such as DDS or VTF. Converting a transparent PNG decal, HUD icon or skin to 32-bit TGA gives those tools a file they accept with alpha intact.
Importing sprites into a 3D or game engine that prefers TGA
Unreal Engine and Unity both import TGA, and some studios standardise on it for source textures because it is uncompressed and unambiguous about alpha. If your artist delivers PNGs but the project convention is TGA, this keeps the asset folder consistent.
Video and motion-graphics overlays
Older editing and compositing pipelines used TGA image sequences for titles and lower-thirds with transparency. Converting a single PNG overlay to TGA fits it into such a project.
What converting PNG to TGA keeps and loses
What you keep
- Every pixel exactly — both formats are lossless (colour-profiled PNGs, such as Display P3, are converted to sRGB first).
- The alpha channel, as 8-bit TGA alpha.
- Pixel dimensions and orientation (written top-to-bottom, flagged in the header).
What you lose
- Compression: the TGA is uncompressed (not RLE), so it is much larger than the PNG.
- The hidden colour of fully transparent pixels, which becomes black.
- 16-bit precision, ICC profile and PNG text metadata.
Our test: PNG to TGA on two real files
A TGA from Pixohub is an 18-byte header plus 4 bytes per pixel, so the photo came to 7,680,018 bytes and the graphic to 1,920,018, 3.7 and 8.5 times the PNGs. The graphic kept its full alpha channel and every visible pixel matched the PNG. Under that alpha, though, every fully transparent pixel was saved with black colour values, which is what matters for texture filtering.
The photo's 33.56 dB PSNR comes from the browser converting its Display P3 profile to sRGB, which a game engine would otherwise have ignored. Each file was ready in under a second, since writing raw bytes costs almost nothing.
Method: this converter in Chromium (Playwright 1.64.1) on an Apple M2 Mac, default 85% quality for lossy output. The photo is an iPhone 14 Pro Max shot scaled to 1600 × 1200, metadata intact; the graphic has a transparent background, soft shadow, gradients and text. SSIM and PSNR compare each result with the decoded original on white (how we test).
| Test file | PNG in | TGA out | Pixels vs original | Transparency | Camera EXIF | Time |
|---|---|---|---|---|---|---|
| Photo, 1600 × 1200 | 2.1 MB | 7.7 MB (3.7× larger) | SSIM 1.000 · 33.6 dB | None in source | Removed | 1.0 s |
| Graphic, 800 × 600, transparent | 225 KB | 1.9 MB (8.5× larger) | Identical pixels | Kept | None in source | 0.8 s |
Last updated
Apps and sites that work with PNG and TGA
Game engines
Unity's texture importer lists TGA alongside PNG, PSD and TIFF; Unreal Engine's importer accepts TGA, PNG, PSD, BMP, JPG and EXR; Godot imports Truevision Targa as well. All three convert the TGA to their own compressed texture format on import, so the source's size on disk only affects your project folder and version control.
Blender and texture painting tools
Blender offers both 'Targa' (run-length compressed) and 'Targa Raw' (uncompressed) as output formats and reads either as a texture. Pixohub's file is the raw kind. Photoshop saves TGA at 16, 24 or 32 bits per pixel; only the 32-bit option keeps alpha.
Libraries that read it
stb_image, used in countless small engines and tools, reads TGA, as do Pillow and GIMP. OpenCV's imread does not list TGA among its formats, so computer-vision scripts are better fed PNG. Pillow can also write TGA, with optional RLE compression, if you need to batch the conversion in Python.
Common PNG to TGA problems and fixes
The texture is upside down in an older loader
TGA can store rows bottom-up or top-down, signalled by a bit in the header's descriptor byte. Pixohub writes top-down and sets that bit. Loaders that ignore the flag and assume the classic bottom-up layout show the image flipped. Fix the loader, flip the texture in your engine's import settings, or re-save it from GIMP with the origin set to bottom left.
Alpha disappears after re-saving
If you open the TGA in Photoshop and save it again, the save dialog's resolution choice decides the alpha: 24 bits/pixel silently drops it, 32 bits/pixel keeps it. The same applies to batch actions. If your engine suddenly shows a black or white box where transparency was, check that setting first.
cv2.imread returns None
OpenCV does not decode TGA, and instead of raising an error it returns None, which then fails later with a confusing message about the image's shape. Load the file with Pillow and pass the array to OpenCV, or keep a PNG copy for scripts and use the TGA only in the texture pipeline.
Tips for better PNG to TGA results
- Game textures usually work best at power-of-two sizes (512, 1024, 2048). Resize with the image resizer before converting if your engine requires it.
- If dark fringes appear around transparent edges in-engine, add edge padding in your texture tool or use pre-multiplied alpha blending.
How this converter works
Pixohub decodes your PNG and encodes the TGA entirely inside your browser. Nothing is uploaded, so the conversion is private by design and as fast as your device.
Need more? Shrink the result with the image compressor, change its dimensions with the image resizer, or convert a whole folder at once with bulk format convert.