Skip to content
pdfconversionapi

EXR to ICO API

POST an .exr to /v2/convert/exr/to/ico and get a Windows icon with a single 32-bit image. The 240 × 300 sample was fitted inside 256 × 256 and came back as a 205 × 256 icon of 50,959 bytes.

Endpoint
POST /v2/convert/exr/to/ico
Accepts
exr
Sample timing
25 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/exr/to/ico \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@glowing-bulb-render.exr \
  -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 OK25 ms median1 file, 50 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.025,
  "Files": [
    {
      "FileName": "glowing-bulb-render.ico",
      "FileExt": "ico",
      "FileSize": 50959,
      "FileData": "AAABAAEAzQAAAAAAIAD5xgAA…"
    }
  ]
}

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 glowing-bulb-render.ico, rendered by the API
Input
glowing-bulb-render.exr (187 KB)
Output
glowing-bulb-render.ico (50 KB)
Source
A glowing light bulb we drew in code and saved as a 240 × 300 OpenEXR render: half-float RGBA, premultiplied alpha, ZIP compression, values up to 12.0. (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
ImageWidthintegerScales before the 256 px cap: ImageWidth=120 gave a 120 × 150 icon of 21,218 bytes. Asking for 800 still ends at 205 × 256.Values: 1–20000
ImageHeightintegerScales by height; ImageHeight=100 made 80 × 100 (11,406 bytes). With a width, the render fits inside both.Values: 1–20000
ScaleProportionsboolean, default truefalse with 200 × 200 makes a square icon (40,936 bytes) by squeezing the bulb.
ScaleIfLargerboolean, default falsetrue skips any enlargement you ask for. The 256 px fit happens either way.
ScaleImageboolean, default truefalse crops rather than scales: 200 × 100 kept the top of the glass (25,709 bytes).
ColorSpaceenum, default defaultgray gave a gray icon of 49,368 bytes and monochrome one of 19,257; alpha stays in both, soft edges included. The threshold runs again after the 256 px fit, so the monochrome icon holds only black and white.Values: default, rgb, gray, monochrome; cmyk returns 400
FileNamestringName of the .ico file; by default it follows the upload.
StoreFileboolean, default falseKeeps the icon for 3 hours and returns Files[].Url.

What carries over, and what doesn't

Kept

  • Transparency: in the 205 × 256 icon, 19,207 pixels are fully clear and 15,811 partly clear
  • The render's aspect ratio when it is fitted under 256 px
  • Full color at 8 bits per channel, stored as a PNG inside the icon

Lost or not yet supported

  • Other icon sizes. The file has one image, so a program that wants 16, 32 or 48 px has to scale it.
  • Squareness. A 4:5 render gives a 205 × 256 icon rather than a square one.
  • Highlights above 1.0 and the 16-bit half-float depth.
  • Correct brightness at soft edges, because premultiplied colors are not divided by alpha.

Limits

  • One render per request; output at most 256 × 256.
  • Request size limit: 10 MB on the Free plan or 100 MB on paid plans.
  • Input renders up to 100,000,000 pixels.
  • ImageWidth and ImageHeight from 1 to 20,000.
  • 120 seconds per conversion.

Where teams use it

App and shortcut icons from a 3D render

A team that models its app icon or mascot in a 3D package can render it to EXR. One request turns the render into an .ico for a Windows build or installer, with the transparent background kept.

Favicons from product renders

A site can make its favicon from the same render as its hero image. Send ImageWidth=48 for a small icon; this 4:5 render then comes back 48 × 60.

Questions

Which sizes are inside the icon?

Exactly one. The icon directory lists a single 32-bit image, stored as a PNG. For a set such as 16, 32, 48 and 256, make one request per size and combine the images with an icon tool.

Why is the icon 205 × 256 and not square?

Images wider or taller than 256 are scaled to fit 256 × 256 with their proportions, and this render is 4:5. Send ImageWidth=256, ImageHeight=256 and ScaleProportions=false to stretch it, or crop the render to a square first.

Is the image inside the icon PNG or BMP?

PNG. The directory entry points at data starting with the PNG signature, 32 bits per pixel. The entry's height byte is 0, which the ICO format uses to mean 256.

Convert your first EXR file in a minute.