Skip to content
pdfconversionapi

KRA to TIFF API

POST /v2/convert/kra/to/tiff merges the visible layers of a Krita file into one uncompressed TIFF page. Alpha is stored as a fourth channel, 16-bit canvases keep 16 bits, and ImageResolution writes the DPI a print workflow expects.

Endpoint
POST /v2/convert/kra/to/tiff
Accepts
kra
Sample timing
23 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/kra/to/tiff \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@rocket-sticker.kra \
  --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 OK23 ms median1 file, 400 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.023,
  "Files": [
    {
      "FileName": "rocket-sticker.tiff",
      "FileExt": "tiff",
      "FileSize": 409814,
      "FileData": "SUkqAChABgAsAQAAAQAAACwB…"
    }
  ]
}

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 rocket-sticker.tiff, rendered by the API
Input
rocket-sticker.kra (108 KB)
Output
rocket-sticker.tiff (400 KB)
Source
A cartoon rocket sticker on a transparent canvas that we drew and saved as a six-layer KRA file (one layer hidden, one faded by a transparency mask). (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 the TIFF's resolution tags in dots per inch. The sample sends 300 to match the ppi saved in the .kra; leave it out and the tags read 1/1 with no unit.Values: 10–800
ImageWidthintegerTarget width in pixels. Uncompressed TIFFs grow quickly with size: ImageWidth=640 at 300 dpi made a 1,638,630-byte file, four times the 320 px one.Values: 1–20000
ImageHeightintegerTarget height. With a width as well, the canvas fits within the box (100 × 100 for a 200 × 100 request).Values: 1–20000
ScaleProportionsboolean, default truefalse stretches to the full box; 200 × 100 then really is 200 × 100 (80,214 bytes).
ScaleIfLargerboolean, default falseWith true, sizes above the canvas are ignored instead of upscaling.
ScaleImageboolean, default trueWith false, the width and height cut a region from the top-left corner (43,414 bytes for 120 × 90).
ColorSpaceenum, default defaultOn a KRA with transparency, gray and monochrome keep the RGBA layout: R, G and B carry the same gray value, alpha stays, and the file is still 409,814 bytes. Opaque canvases convert to a one-sample, 8-bit gray TIFF. truecolors equals the default, while rgb writes an opaque gray Krita canvas with three samples where the default keeps one: 9,426 against 3,270 bytes for a 64 × 48 test file.Values: default (also truecolors), rgb (also srgb), gray (also grayscale), monochrome; cmyk returns 400
TransparentColorstringClears every pixel of one exact color; #FFFFFF took out 104 pure white pixels along the edge of the rocket's body, most of them already faint.Values: #RRGGBB, R,G,B or a color name
FileNamestringOutput name without the extension; rocket-sticker.tiff if you leave it out.
StoreFileboolean, default falseReturns a link valid for 3 hours instead of the 409,814 bytes inline.

What carries over, and what doesn't

Kept

  • The merged pixels exactly: the TIFF decodes to the same values as our PNG of the same file
  • Alpha as a fourth 8-bit sample, so 4,962 soft edge and shadow pixels stay partly transparent
  • 16 bits per sample from 16-bit integer RGBA canvases (BitsPerSample 16, 16, 16 in our test)
  • The DPI you send: the sample's tags read 300 × 300 per inch

Lost or not yet supported

  • Compression. The TIFF is stored raw, so the 320 × 320 sample is 409,814 bytes, about 15 times its PNG.
  • Layers and layer names; TIFF gets one merged page.
  • The embedded color profile, which is not written into the TIFF.
  • Vector and filter layers, left out with no error in the response.
  • A smaller gray file for transparent art: ColorSpace=gray repeats the gray value in three channels next to alpha, so nothing is saved.

Limits

  • One KRA per request, up to 100,000,000 pixels of canvas and 300,000 px 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 before a 504.
  • One page per TIFF, uncompressed; there is no option for LZW or ZIP compression.
  • Float, CMYK and Lab KRA files return the flattened copy saved inside them, or 422 when that copy is missing.

Where teams use it

Print shops and prepress

When a print service asks for TIFF at a stated resolution, send the Krita file with ImageResolution=300 and the TIFF says 300 dpi, so the 320 px sticker measures 1.07 inches at that setting.

Archiving finished artwork

Keep an uncompressed, flat copy next to the layered .kra. The TIFF holds the merged pixels exactly, with alpha, and needs no painting app to open.

16-bit masters for retouching

A 16-bit integer Krita canvas comes back as a 16-bit TIFF, so the extra precision painted in Krita is still there for color correction.

Questions

What DPI does the TIFF get?

None by default: the resolution tags say 1/1 with no unit, even though the sample KRA was saved at 300 ppi. Send ImageResolution with the value you need, from 10 to 800; the sample uses 300.

Does a 16-bit Krita file stay 16-bit?

Yes, for Krita's 16-bit integer RGBA and grayscale modes. A 16-bit ramp came back with every value exact, for example 4369 and 8738 out of 65535. Float and CMYK documents are not merged from their layers yet; the copy Krita stores inside the file is returned instead.

Can I get a grayscale TIFF of transparent art?

Yes, with a catch. On the sticker, ColorSpace=gray returns an RGBA TIFF whose three color channels hold equal gray values, with the soft edges' alpha intact; monochrome leaves only black and white. Only an opaque canvas gives a true one-sample gray TIFF: a 128 × 96 test KRA came back at 12,486 bytes.

Convert your first KRA file in a minute.