The OpenEXR API¶
There are two separate, independent APIs for reading and writing EXRimage files: the traditional C++ API, and the newer C API, referred toasOpenEXRCore. The C++ API is the original, widely-used interfacefirst released in 2003. It consists of theOpenEXR,Iex, andIlmThread libraries, with functions and classes in theImf::namespace (or “image format”, the original the name of the library atILM prior to its public release).
TheOpenEXRCore library, written primarily by Kimball Thurston atWeta Digital, was introduced in July, 2021. This C-languageimplementation of the file format is the result of a significantre-thinking of image file I/O and access to image data. TheOpenEXRCore library provides thread-safe, non-blocking access tofiles, which was not possible with the older C++ API, where theframebuffer management is separate from read requests. This newlow-level API allows applications to do custom unpacking of EXR data,such as on the GPU, while still benefiting from efficient I/O, filevalidation, and other semantics. It provides efficient direct accessto EXR files in texturing applications. This C library also introducesan easier path to implementing OpenEXR bindings in other languages,such as Rust.
Currently, the two libraries and APIs sit alongside each other,although in future OpenEXR releases, the C++ API will migrate to usethe new core in stages. It is not the intention to entirely deprecatethe C++ API, nor must all applications re-implement EXR I/O in termsof the C library. The C API does not, and will not, provide the richset of utility classes that exist in the C++ layer. TheOpenEXRCore library simply offers new functionality for specialtyapplications seeking the highest possible performance.
API
- Hello, World
- Reading and Writing Image Files with the OpenEXR Library
- Document Purpose and Audience
- Scan Line Based and Tiled OpenEXR files
- Using the RGBA-only Interface for Scan Line Based Files
- Using the General Interface for Scan Line Based Files
- Tiles, Levels and Level Modes
- Using the RGBA-only Interface for Tiled Files
- Using the General Interface for Tiled Files
- Deep Data Files
- Threads
- Low-Level I/O
- Miscellaneous
- Reading and Writing Image Files with the C-language API
