OpenEXR (.exr)

Registered MIME type: image/x-exr
OpenEXR raster image format.
Used in digital image manipulation for theatrical film production.
EXR is an acronym for Extended Dynamic Range.
Binary file format.
Stores 16 bit per pixel IEEE HALF-precision floating-point color channels.
Can optionally store 32-bit IEEE floating-point "Z" channel depth-buffer components, surface normal directions, or motion vectors.
Can store multiple images using either Tiled or Multi-View scanline modes.
Supports alpha channels.
Introduced in 2003 by Industrial Light and Magic.
  • Import supports Version 2.0 of the OpenEXR file format.

Import and ExportImport and Export

  • Import["file.exr"] imports an OpenEXR file as a single Image.
  • Import["file.exr"] reads an OpenEXR file and returns a list of rules representing color transformation components.
  • Import["file.exr",elem] imports the specified element from an OpenEXR file.
  • Import["file.exr",{elem,sub,}] imports a subelement.
  • Import["file.exr",{{elem1,elem2,}}] imports multiple elements.
  • The import format can be specified with Import["file","OpenEXR"] or Import["file",{"OpenEXR",elem,}].
  • See the reference pages for full general information on Import.
  • ImportString supports the OpenEXR format.

ElementsElements

  • General Import elements:
  • "Elements"list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • Data representation elements:
  • "Data"raw data of all channels in an OpenEXR file
    "Graphics"first image of an OpenEXR file, given as a Graphics object
    "GraphicsList"images of a multi-image OpenEXR, given as a list of Graphics objects
    "Image"first image of an OpenEXR file, given as an Image object
    "ImageList"images of an OpenEXR file, given as a list of Image objects
    "RGBColorArray"array of RGBColor objects
  • Metadata elements:
  • "Attributes"list of all attributes stored in the OpenEXR file
    "Author"creator name
    "ColorSpace"color encoding used in the file
    "Comments"user comments
    "CopyrightNotice"copyright information as a string
    "Compression"how images are compressed in the file
    "DataWindow"coordinates of the corners of the data window
    "DisplayWindow"coordinates of the corners of the display window
    "ImageChannels"list of image channels stored in the OpenEXR file
    "ImageSize"raster dimensions
    "Version"version of the OpenEXR file
  • Import by default uses the element.
  • Specifying and selecting channels:
  • "Data",channelraw data from the named channel
    "Image",datasetImage object from the named dataset
    "Graphics",dataset Graphics object from the named dataset
  • The data representation elements are imported from the data window.
  • Accepted and dataset names are and .
  • Typical channel names include, for example, , , and (indicating particular channels of stereographic images).

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Import a raster image from an OpenEXR file:

In[1]:=
Click for copyable input
Out[1]=

Import the list of channel names from an OpenEXR file:

In[1]:=
Click for copyable input
Out[1]=

Import the image formed from the right channels:

In[2]:=
Click for copyable input
Out[2]=

Import the list of images from a multi-resolution OpenEXR file:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2012
(9.0)