OpenEXR (.exr)

Background & Context

    • 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["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.
  • 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.

Import Elements

  • 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
  • Advanced Import elements:
  • "BitDepth"number of bits used to encode a color channel in the file
    "Channels"the number of color channels used in the file
    "Summary"summary of the file
  • 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
  • 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 "Image" 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 "Image" and "Graphics" dataset names are "Right" and "Left".
  • Typical "Data" channel names include, for example, "R", "right.R", and "left.R" (indicating particular channels of stereographic images).


Basic Examples  (3)

Import an OpenEXR file:

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

Summary of an image: