ORA to TGA API
POST an .ora to /v2/convert/ora/to/tga and receive the composited layers as a 32-bit Targa, image type 2 (no compression), top row first. An alpha channel is always written, full where the canvas is opaque.
- Endpoint
- POST /v2/
convert/ ora/ to/ tga - Accepts
- ora
- Sample timing
- 43 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/ora/to/tga \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@garden-plan.ora \
-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
fiimport base64
import os
import requests
key = os.environ["PDFCONVERSIONAPI_KEY"]
response = requests.post(
"https://api.pdfconversionapi.com/v2/convert/ora/to/tga",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("garden-plan.ora", "rb"))],
timeout=180,
)
result = response.json()
if not response.ok:
raise SystemExit(f"{result['Code']}: {result['Message']}")
os.makedirs("converted", exist_ok=True)
for file in result["Files"]:
path = os.path.join("converted", file["FileName"])
with open(path, "wb") as out:
out.write(base64.b64decode(file["FileData"]))
print(path, file["FileSize"], "bytes")
import { mkdir, readFile, writeFile } from "node:fs/promises";
import { join } from "node:path";
const form = new FormData();
const file = "garden-plan.ora";
form.append("File", new Blob([await readFile(file)]), file);
const url = "https://api.pdfconversionapi.com/v2/convert/ora/to/tga";
const key = process.env.PDFCONVERSIONAPI_KEY;
const response = await fetch(url, {
method: "POST",
headers: { Authorization: `Bearer ${key}` },
body: form,
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.Code}: ${result.Message}`);
}
await mkdir("converted", { recursive: true });
for (const file of result.Files) {
const path = join("converted", file.FileName);
await writeFile(path, Buffer.from(file.FileData, "base64"));
console.log(path, file.FileSize, "bytes");
}
{
"ConversionCost": 1,
"ConversionTime": 0.043,
"Files": [
{
"FileName": "garden-plan.tga",
"FileExt": "tga",
"FileSize": 480018,
"FileData": "AAACAAAAAAAAAAAAkAEsASAo…"
}
]
}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.

- Input
- garden-plan.ora (123 KB)
- Output
- garden-plan.tga (469 KB)
- Source
- A backyard vegetable garden plan that we drew and saved as an OpenRaster file with seven layers and a layer group, including a hidden layer and a multiply layer. (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.
| Parameter | What it does |
|---|---|
ImageWidthinteger | Texture width; 160 gives 160 × 120 and 76,818 bytes.Values: 1–20000 |
ImageHeightinteger | Texture height; 150 gives 200 × 150 and 120,018 bytes.Values: 1–20000 |
ScaleProportionsboolean, default true | false for an exact box such as a 200 × 200 square (160,018 bytes). |
ScaleIfLargerboolean, default false | true keeps the canvas size when a larger one is asked for. |
ScaleImageboolean, default true | false crops instead (43,218 bytes for 120 × 90). |
ColorSpaceenum, default default | gray and monochrome change the values only; with no compression the 400 × 300 file stays 480,018 bytes.Values: default, rgb, gray, monochrome (also srgb, truecolors, grayscale); cmyk returns 400 |
TransparentColorstring | Zeroes the alpha of one exact color; #FFFFFF cleared 13 pixels of the plan.Values: #RRGGBB, R,G,B or a color name |
FileNamestring | Name of the .tga file. |
StoreFileboolean, default false | Keep the TGA for 3 hours and return a URL. |
What carries over, and what doesn't
Kept
- The composite exactly: decoded, the TGA matches our PNG output pixel for pixel
- An 8-bit alpha channel, 255 everywhere for the opaque plan
- Top-left origin, set in the image descriptor (0x28)
Lost or not yet supported
- Compression. The pixels are stored raw, so the plan is 480,018 bytes, more than seven times the 66,293-byte PNG.
- A TGA 2.0 footer and any image ID.
- Layers, 16-bit depth and the 150 ppi.
Limits
- One .ora per request, canvas up to 100,000,000 pixels and 300,000 px a side.
- Width and height in a Targa header are 16-bit values: a 65,536 × 10 test .ora returned 413
TGA images can be at most 65,535 pixels on a side. - 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.
- 32-bit uncompressed only; no RLE or 24-bit choice.
Where teams use it
Textures painted in OpenRaster apps
Hand-painted textures and decals kept as .ora sources can be converted to TGA in the asset build, so the import step on the engine side does not change.
Maps and boards for games
Top-down maps drawn in layers, like the sample plan, can ship as TGA for engines or tools that read it, with ImageWidth setting the texture size.
Questions
Will strict TGA readers open the file?
The file has no run-length packets to trip over: an 18-byte header, then raw blue, green, red and alpha bytes for each pixel, top row first. Both readers we tried opened the sample and the monochrome version, and the sample decoded to exactly our PNG output.
Why is the TGA so large for a flat drawing?
Nothing is compressed, so the content doesn't matter: 4 bytes for each of the 120,000 pixels plus 18 header bytes. The monochrome version is the same 480,018 bytes. For a smaller lossless file, our ORA to PNG and ORA to WebP routes gave 66,293 and 62,112 bytes.
Does it keep transparency from the .ora?
Yes. The TGA is always 32-bit; a transparent canvas keeps its alpha values, and an opaque one like the sample has alpha 255 throughout.
Convert your first ORA file in a minute.