TGA to PPM Converter

Convert TGA to PPM online for free. Fast, high-quality PPM output in your browser. 100% browser-based — no upload, no signup, no watermark.

How to use TGA to PPM

  1. 1Click the upload area or drag your TGA file into it.
  2. 2Preview the image to confirm it loaded correctly.
  3. 3Click Convert to render the PPM in your browser.
  4. 4Download your new PPM file — nothing is uploaded.

Features

  • Instant TGA → PPM conversion, 100% in-browser
  • Your files never leave your device
  • Lossless, high-quality output
  • Free, unlimited, no signup or watermark

TGA vs PPM: technical differences

To convert TGA to PPM, drop your TGA file into the converter above and download the PPM: the plain, uncompressed Netpbm format that image-processing scripts read. It is free, needs no sign-up, and runs in your browser, so the file is never uploaded.

Both formats are raw-pixel formats at heart, which makes this one of the simplest conversions possible. A 24-bit TGA stores BGR bytes, usually bottom row first, after an 18-byte binary header. A P6 PPM stores RGB bytes top row first after a short text header. Pixohub handles the byte order and row order for you, reading the TGA's origin flag so the PPM comes out upright.

The difference that matters is alpha. PPM has none, so 32-bit TGAs are blended onto white. For 24-bit files, the pixel data is identical and the file size is essentially unchanged: width × height × 3 bytes in both cases, plus each format's header.

Input must be true-colour TGA (24/32-bit, raw or RLE). The PPM output is 8-bit binary P6 with maxval 255 and no comments, so it's easy to read from your own code.

TGA (Truevision TGA (Targa))PPM (Portable Pixmap (Netpbm))
CompressionNone or lossless RLENone (raw binary P6 or ASCII P3)
Colour depth8, 16, 24 or 32 bits per pixel8 or 16 bits per channel, RGB only
Transparency8-bit alpha in 32-bit filesNone
AnimationNoneNone
MetadataOptional image ID and extension areaComment lines in the header only
Typical file sizeLarge — close to raw pixel sizeVery large — exactly width × height × 3 bytes plus a header
SupportGame engines, 3D and video tools; browsers cannot display itImage-processing libraries, Netpbm, GIMP; not browsers

When to convert TGA to PPM

Graphics coursework

Assignments that ask you to write a PPM reader, or to run filters on PPM input, become easier to test with real images. Game textures and screenshots in TGA give you varied, colourful test data.

Netpbm pipelines

Netpbm has its own tgatoppm converter, but if you don't have it installed (on Windows, for example), this does the same job in the browser before you pipe the result into pnmscale or pnmquant.

Debugging a TGA loader

If you're writing your own TGA decoder, a PPM converted here makes a handy known-good reference to diff your output against byte for byte, after accounting for the white alpha flattening on 32-bit files.

What converting TGA to PPM keeps and loses

What you keep

  • Exact RGB values of opaque pixels.
  • Resolution, with rows written top-down in correct orientation.

What you lose

  • The alpha channel. Transparent pixels are blended onto white.
  • TGA image ID and extension-area metadata.
  • RLE compression, if the TGA used it.

Our test: TGA to PPM on two real files

For the 24-bit photo, TGA and PPM held the same pixels in almost the same bytes: 5,760,044 in, 5,760,017 out, identical. The 27-byte saving is the TGA's 18-byte header plus a 26-byte image ID, replaced by PPM's 17-byte text header.

The 32-bit graphic dropped from 1.9 MB to 1.4 MB because PPM has no alpha: transparent pixels were blended onto white, and the result was identical to the TGA viewed on white. Each conversion took about a second.

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 fileTGA inPPM outPixels vs originalTransparencyCamera EXIFTime
Photo, 1600 × 12005.8 MB5.8 MB (same)Identical pixelsNone in sourceNone in source1.1 s
Graphic, 800 × 600, transparent1.9 MB1.4 MB (−25%)Identical pixelsFlattened onto whiteNone in source0.9 s

Last updated

Apps and sites that work with TGA and PPM

OpenCV reads PPM but not TGA

OpenCV's imread handles PPM, PNG, BMP and others but not TGA, so computer-vision code that has to process game screenshots or textures needs them converted first. The PPM loads with no extra libraries. Pillow could bridge the gap, but converting once keeps a C++ or Python script dependency-free.

Pillow and stb_image

Python's Pillow and the single-header stb_image library read both formats, so for them the conversion is only worth it when an assignment or test harness specifically requires PPM. Both return a 32-bit TGA's alpha as a fourth channel, which the PPM won't have.

Viewers for both

GIMP, IrfanView and XnView open TGA and PPM, so you can check the two files side by side. Windows Photos and browsers open neither. They also show image dimensions and bit depth, which helps when you check a decoder's output against the original file.

Common TGA to PPM problems and fixes

Your TGA decoder's output is flipped

If your own decoder's output differs from this PPM by being upside down, it ignores bit 5 of the TGA header's descriptor byte (byte 17). Bottom-up files leave it clear, top-down files set it. Pixohub applies it and writes the PPM top row first. Testing your decoder on both bottom-up and top-down files catches this early.

Your decoder's pixels are offset

Byte 0 of a TGA header gives the length of an optional image ID that sits between the header and the pixels. Our test TGA had a 26-byte ID. A decoder that starts reading at byte 18 regardless shifts the whole image and garbles colours; skip 18 + ID length bytes.

Colours swapped against the PPM

TGA stores blue-green-red, PPM red-green-blue. If your decoder's output has red and blue exchanged compared with Pixohub's PPM, it is copying TGA bytes in file order. Reorder the channels when reading. Pixohub's own reader does exactly that swap when loading the TGA, so the PPM is the reference to check against.

Tips for better TGA to PPM results

  • Comparing against your own decoder? Use 24-bit TGAs, so white-flattening of alpha doesn't create differences.
  • If you need the alpha too, convert the TGA to PNG as well and read the alpha from that.

How this converter works

Pixohub decodes your TGA and encodes the PPM entirely inside your browser, using a bundled TGA decoder because browsers cannot open TGA natively. 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.

Frequently asked questions

What happens to transparency in a 32-bit TGA?

PPM has no alpha channel, so every pixel is blended onto white according to its alpha. Fully transparent areas become pure white.

Is the PPM the same size as the TGA?

For an uncompressed 24-bit TGA, almost exactly. Both are width × height × 3 bytes plus a small header. It's smaller than a 32-bit TGA and larger than an RLE-compressed one.

Will the PPM be upside down?

No. TGAs are usually stored bottom-up, and Pixohub reads the origin flag and writes the PPM top-down, as the PPM format requires.

Can I get an ASCII P3 file instead?

Pixohub writes binary P6. Convert with Netpbm's pnmtoplainpnm or ImageMagick's -compress none if your assignment requires P3.

Is the conversion local?

Yes. The TGA is decoded and the PPM written in your browser, with no upload.

More converters

Batch: convert format many images at once

Same processing as above, run across a set of files. Pro returns the whole batch as one ZIP. Still entirely in your browser.

Free · up to 20

PRONeed more than 20 at a time?

Pro runs up to 150 images per batch as one ZIP, keeps your brand mark on every export, and lifts the file ceiling to 200 MB.

Unlock with Pro