Introduction
OpenEXR is a high dynamic range image format developed by Industrial Light & Magic for visual effects work and released as open source in 2003. It is now looked after by the Academy Software Foundation. Channels hold 16-bit half floats, 32-bit floats or 32-bit unsigned integers, so an image can hold brightness far beyond white without clipping.
An EXR file can hold any number of named channels, such as colour, alpha, depth and the separate passes of a 3D render, and several images or layers in one file. It is the standard interchange format for film, animation and rendering.
Structure
An EXR file starts with the magic number 76 2F 31 01 and a 4-byte version
field, whose low byte is 2 and whose higher bits mark tiled, deep and multi-part files.
A header of attributes follows, each a name, a type name, a size and a value, ended by a
zero byte. Required attributes include channels, compression,
dataWindow, displayWindow and lineOrder. All
numbers are little-endian.
After the header comes an offset table with one 8-byte offset per chunk, so a reader can jump to any block of scan lines or any tile. The chunks hold the pixel data, compressed with methods such as ZIP, PIZ, PXR24, B44 or DWAA. The reference pages cover the header, the attribute types and the chunks.
0Magic number76 2F 31 014 bytes4Version and flags4 bytes8Header attributes, ended by a zero bytevaries…Offset table one offset per chunk8 bytes each…Chunks blocks of scan lines or tilesvaries
Not described
OpenEXR is open source and documented. These pages follow its file layout and standard attribute documents and the library’s core source; the parts below are not covered yet.
Known, not yet covered
- Reference: the bitstreams of the PIZ, PXR24, B44, B44A, DWAA, DWAB and HTJ2K compressors (the library source describes them); the chunks page gives the codes and the simple RLE and ZIP byte transform only.
- Reference: the layout of the
idManifestattribute. - Viewer: none. The file opens as raw bytes only.
Unknown
- Reference: the size of the part number in deep chunks (the file layout document says 8 bytes, the library source 4) and the compression of deep data (the document says ZIP, the library also ZSTD); the two public sources disagree and the pages state both.
Links
Software
- Blender – free 3D suite that renders to EXR, including multi-layer files (Windows, macOS, Linux)
- Nuke – Foundry’s compositing software for film and visual effects (Windows, macOS, Linux)
- Adobe Photoshop – Adobe’s image editor, which opens and saves EXR (Windows, macOS)
- Affinity Photo – photo editor that opens and exports EXR (Windows, macOS, iPad)
- GIMP – free image editor that opens and exports EXR (Windows, macOS, Linux)
- Krita – free painting program that opens and saves EXR (Windows, macOS, Linux)
- tev – free HDR image viewer for comparing images (Windows, macOS, Linux)
Developers
- OpenEXR – the reference library, with command-line tools (C, C++)
- OpenImageIO – image library used across film tools (C++, Python)
- tinyexr – small loader and saver in one header (C++)
Reference
- OpenEXR documentation – the Academy Software Foundation’s documentation, including the file layout