Skip to content
pdfconversionapi

TGA to TIFF API

POST a TGA to /v2/convert/tga/to/tiff and get an uncompressed single-page TIFF. Color TGAs give RGB or RGBA, grayscale gives 8-bit gray (RGBA if it has alpha), and ImageResolution writes a real DPI.

Endpoint
POST /v2/convert/tga/to/tiff
Accepts
tga
Sample timing
under 1 ms median of 5 runsHow we measure
Request size
Up to 10 MB on the Free plan or 100 MB on paid plans, all files together

Request and response

Every sample below ran against the API before this page was published. Set PDFCONVERSIONAPI_KEY to your key and run it as is.

curl -sS -X POST \
  https://api.pdfconversionapi.com/v2/convert/tga/to/tiff \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@shield-icon.tga \
  --form-string ImageResolution=300 \
  -o response.json

# FileData is base64. Save the first file in converted/,
# or print the JSON error.
if jq -e '.Files' response.json > /dev/null; then
  mkdir -p converted
  name=$(jq -r '.Files[0].FileName' response.json)
  jq -r '.Files[0].FileData' response.json \
    | base64 --decode > "converted/$name"
else
  cat response.json
fi
200 OKunder 1 ms median1 file, 256 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0,
  "Files": [
    {
      "FileName": "shield-icon.tiff",
      "FileExt": "tiff",
      "FileSize": 262358,
      "FileData": "SUkqACgABAAsAQAAAQAAACwB…"
    }
  ]
}

Response from our test run on 2026-11-03. ConversionTime shows the median of 5 runs. FileData is shortened here; the real response carries the whole file as base64.

The sample, converted

The same file the code sends. Download the input and the output and compare them yourself.

First page of shield-icon.tiff, rendered by the API
Input
shield-icon.tga (16 KB)
Output
shield-icon.tiff (256 KB)
Source
A 256 x 256 pixel-art shield icon with a transparent background and a half-transparent shadow, drawn by us and saved as a 32-bit run-length-encoded TGA. (CC0-1.0). How it was made
Made by
2026-11-04, API build 9eeeb0640aba

Parameters

Send these as form fields next to the file. Names are case-insensitive. If you set one of the documented options below that we don't support yet, the request fails with a 400 that names it instead of returning a file made without it.

ParameterWhat it does
ImageResolutionintegerFills XResolution and YResolution with this value and sets the unit to inches; the sample is tagged 300 dpi. Without it the tags read 1/1 with no unit.Values: 10–800
ImageWidthintegerResample to this width before writing. The TIFF is uncompressed, so its size follows the pixel count.Values: 1–20000
ImageHeightintegerResample to this height, or fit inside a width × height box.Values: 1–20000
ScaleProportionsboolean, default truefalse fills the exact box, changing the aspect ratio.
ScaleIfLargerboolean, default falsetrue stops small textures from being enlarged.
ScaleImageboolean, default truefalse crops rather than resamples.
ColorSpaceenum, default defaultgray gives an 8-bit grayscale TIFF for opaque TGAs (65,734 bytes from a 24-bit copy of the shield). On a TGA with transparent pixels, gray and monochrome keep the alpha and write RGBA with equal gray channels: 262,358 bytes for the shield.Values: default, rgb, gray, monochrome; cmyk returns 400
TransparentColorstringSets alpha to 0 for pixels of exactly this color, producing an RGBA TIFF.Values: #RRGGBB, R,G,B or a basic color name
FileNamestringName for the .tiff file.
StoreFileboolean, default falseStore the TIFF for 3 hours and return a URL.

What carries over, and what doesn't

Kept

  • Every pixel and alpha value of the sample (8 bits per sample, 4 samples per pixel)
  • Grayscale as grayscale: a gray TGA became an 8-bit, one-channel TIFF
  • A DPI you can rely on: the sample's tags read 300 × 300 pixels per inch

Lost or not yet supported

  • Compression. The TIFF is written uncompressed: 262,358 bytes for the 16,376-byte sample.
  • A label on the alpha channel. The fourth sample has no ExtraSamples tag; two readers we tried still treated it as transparency, but a strict TIFF reader warned about the channel count.
  • A gray-plus-alpha layout. A grayscale TGA with alpha, or ColorSpace=gray on a transparent one, is written as RGBA with the gray value in each color sample: 262,358 bytes at 256 × 256, twice the pixel bytes that gray plus alpha would need.
  • The TGA image ID and footer.

Limits

  • One TGA per request, one page out.
  • 100,000,000 pixels per image, checked before decoding.
  • Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
  • 120 seconds per conversion, then 504.

Where teams use it

Print and layout from game or render art

Print shops and layout tools work with TIFF at a stated DPI. Convert a TGA render or texture and set ImageResolution so the page knows its print size.

Archiving textures in a common format

If your archive standardizes on TIFF, the uncompressed output keeps the exact pixels and alpha of each TGA, with no compression scheme a future reader must support.

Questions

Can I get a compressed TIFF?

Not from this route today: the strip is stored without compression, and no parameter changes that. If size matters, convert to PNG, which is lossless and much smaller (4,030 bytes for the sample).

What happens to a grayscale TGA with transparency?

It converts, as RGBA. There is no gray-plus-alpha mode on this route, so red, green and blue all carry the gray value: our 256 × 256 gray-plus-alpha test TGA came back as a 262,358-byte TIFF with its alpha intact. A grayscale TGA without alpha still gives an 8-bit, one-channel TIFF.

Will layout programs see 300 dpi?

Yes. ImageResolution=300 writes 300/1 in both resolution tags and sets the unit to inches, which is what layout and print tools read. The sample on this page carries exactly that.

Convert your first TGA file in a minute.