File: API.rst

package info (click to toggle)
openexr 3.4.6%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 41,948 kB
  • sloc: cpp: 166,793; ansic: 26,769; python: 2,990; sh: 581; makefile: 9
file content (50 lines) | stat: -rw-r--r-- 2,098 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
..
  SPDX-License-Identifier: BSD-3-Clause
  Copyright Contributors to the OpenEXR Project.

.. _The OpenEXR API:

The OpenEXR API
###############

There are two separate, independent APIs for reading and writing EXR
image files: the traditional C++ API, and the newer C API, referred to
as ``OpenEXRCore``. The C++ API is the original, widely-used interface
first released in 2003. It consists of the ``OpenEXR``, ``Iex``, and
``IlmThread`` libraries, with functions and classes in the ``Imf::``
namespace (or "image format", the original the name of the library at
ILM prior to its public release).

The ``OpenEXRCore`` library, written primarily by Kimball Thurston at
Weta Digital, was introduced in July, 2021. This C-language
implementation of the file format is the result of a significant
re-thinking of image file I/O and access to image data. The
``OpenEXRCore`` library provides thread-safe, non-blocking access to
files, which was not possible with the older C++ API, where the
framebuffer management is separate from read requests.  This new
low-level API allows applications to do custom unpacking of EXR data,
such as on the GPU, while still benefiting from efficient I/O, file
validation, and other semantics. It provides efficient direct access
to EXR files in texturing applications. This C library also introduces
an 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 use
the new core in stages. It is not the intention to entirely deprecate
the C++ API, nor must all applications re-implement EXR I/O in terms
of the C library. The C API does not, and will not, provide the rich
set of utility classes that exist in the C++ layer.  The
``OpenEXRCore`` library simply offers new functionality for specialty
applications seeking the highest possible performance.

.. toctree::
   :caption: API
   :maxdepth: 2
              
   HelloWorld
   ReadingAndWritingImageFiles
   OpenEXRCoreAPI
              
* :ref:`genindex`