PPM to TGA Converter

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

How to use PPM to TGA

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

Features

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

PPM vs TGA: technical differences

To convert PPM to TGA, drop your PPM 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.

PPM and TGA are both uncompressed-pixel formats from the early days of computer graphics, and converting between them is close to a byte shuffle. Pixohub reads the PPM's RGB rows (top-down) and writes a 32-bit TGA in BGRA order, flagged as top-left origin, with an opaque alpha channel.

Because the output is 32-bit, the TGA is a third larger than the source P6: width × height × 4 bytes plus an 18-byte header. A 1024 × 1024 PPM of 3 MB becomes a 4 MB TGA. The alpha is 255 everywhere, since PPM has no transparency to carry over.

Inputs are limited to P6 at 8 bits and P3 at any maxval. The output is uncompressed TGA type 2, which almost every TGA loader supports, including the minimal ones found in OpenGL tutorials and small engines.

PPM (Portable Pixmap (Netpbm))TGA (Truevision TGA (Targa))
CompressionNone (raw binary P6 or ASCII P3)None or lossless RLE
Colour depth8 or 16 bits per channel, RGB only8, 16, 24 or 32 bits per pixel
TransparencyNone8-bit alpha in 32-bit files
AnimationNoneNone
MetadataComment lines in the header onlyOptional image ID and extension area
Typical file sizeVery large — exactly width × height × 3 bytes plus a headerLarge — close to raw pixel size
SupportImage-processing libraries, Netpbm, GIMP; not browsersGame engines, 3D and video tools; browsers cannot display it

When to convert PPM to TGA

Textures for a hobby OpenGL or game-engine project

Many tutorials ship a tiny TGA loader. If your procedural texture generator writes PPM, converting gives you a texture those loaders can read without changing your generator.

Feeding legacy game or mod tools

Older engines and their tools often expect TGA. Procedurally generated skyboxes, noise maps or terrain textures from a PPM-writing script can be converted for them.

Testing your own TGA writer

Graphics students implementing a TGA encoder can compare their output against this one. Pixohub writes the top-left origin flag (descriptor byte 0x28) with uncompressed BGRA.

What converting PPM to TGA keeps and loses

What you keep

  • Exact 8-bit RGB values.
  • Resolution and orientation, recorded with the top-left origin flag.

What you lose

  • PPM header comments.
  • Precision above 8 bits per channel.
  • A little size efficiency: the 32-bit TGA adds an opaque alpha byte per pixel.

Our test: PPM to TGA on two real files

Both PPMs converted with identical pixels. Each TGA is 4 bytes per pixel plus an 18-byte header, so the photo went from 5,760,017 to 7,680,018 bytes (5.8 to 7.7 MB) and the graphic from 1.4 to 1.9 MB, a third larger in both cases. The added byte is an alpha value of 255 on every pixel.

If your loader handles only 24-bit TGAs, that alpha byte is the one thing to strip. Conversions took 1.1 s and 0.9 s.

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 filePPM inTGA outPixels vs originalTransparencyCamera EXIFTime
Photo, 1600 × 12005.8 MB7.7 MB (+33%)Identical pixelsNone in sourceNone in source1.1 s
Graphic, 800 × 600, transparent1.4 MB1.9 MB (+33%)Identical pixelsNone in sourceNone in source0.9 s

Last updated

Apps and sites that work with PPM and TGA

Loaders in hobby engines

stb_image, which many OpenGL tutorials and small engines use, loads uncompressed 32-bit TGA, so procedural textures from a PPM-writing generator load through the same call as your other assets. Call stbi_set_flip_vertically_on_load(1) if your OpenGL code expects rows bottom-up, as glTexImage2D does.

Game engines

Unity, Unreal Engine and Godot all import TGA, so a generated skybox, noise map or terrain texture converted here can go straight into a project's asset folder. Each engine compresses the texture on import, so the uncompressed TGA's size doesn't affect the shipped game.

Checking the texture

GIMP, Krita, IrfanView, XnView and macOS Preview open TGA, so you can confirm orientation and colours before the engine compresses the texture. Windows Photos and browsers can't display TGA, so use one of these before blaming the converter. Opening the file also confirms the 32-bit depth and the image size.

Common PPM to TGA problems and fixes

A heightmap or noise map renders wrongly

Engines treat colour textures as sRGB by default. A procedurally generated heightmap, mask or noise map is data, and imported as sRGB its mid-tones shift. Untick sRGB in Unity or Unreal for those textures so values are read as written. Colour textures such as procedural albedo keep sRGB on as normal.

Terraces in a heightmap

Pixohub works in 8 bits per channel, so a 16-bit heightmap written as P3 with a high maxval is reduced to 256 levels, which shows as visible steps on gentle slopes. Engines generally take 16-bit heightmaps as RAW or 16-bit PNG; write those directly from your generator. P3 text keeps whatever precision you wrote, but the 8-bit pipeline drops it before the TGA is written.

Blurry or rejected textures

Many engines and older loaders expect power-of-two sizes such as 256, 512 or 1024, and resample or reject other sizes. Set your generator's output size accordingly rather than resizing the TGA afterwards, which would blur procedural detail. Unreal, for example, generates no mipmaps for non-power-of-two textures by default, which shows as shimmering at a distance.

Tips for better PPM to TGA results

  • If a minimal TGA loader shows your texture upside down, it ignores the origin flag and assumes bottom-up. Flip the texture's V coordinate or the image itself.
  • Need transparency? Generate it in your program and write PNG or TGA directly. PPM can't store alpha for the converter to pass on.

How this converter works

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

Is the TGA 24-bit or 32-bit?

32-bit BGRA with a fully opaque alpha channel. If your loader only accepts 24-bit TGAs, re-save in GIMP with alpha removed.

Will my texture be upside down in OpenGL?

Possibly, but not because of the file. Pixohub writes rows top-down with the origin flag set. OpenGL's texture coordinates start at the bottom-left, so some loaders and tutorials flip images on purpose. Check whether your loader honours the flag.

Is the conversion lossless?

Yes, for standard 8-bit PPMs. Every RGB value is copied exactly. Only the byte order, header and alpha byte are added.

Can I convert a set of PPMs to TGA together?

Bulk Format Convert doesn't output TGA, so use this page for single files, or ImageMagick (<em>magick mogrify -format tga *.ppm</em>) for large batches.

Is it processed on my device?

Yes. The PPM is read and the TGA written entirely in your browser.

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