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. Pixels are stored as 16-bit half floats or 32-bit floats, 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.
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
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