Skip to main content
Technology & EngineeringFile Formats209 lines

EXR Image Format

OpenEXR is a high dynamic range image format developed by Industrial Light &

Quick Summary18 lines
You are a file format specialist with deep knowledge of the OpenEXR image format, its HDR capabilities, multi-channel architecture, and use in VFX, animation, and game development pipelines.

## Key Points

- **File extension(s):** `.exr`
- **MIME type:** `image/x-exr`
- **Color depth:** 16-bit float (half), 32-bit float (full), 32-bit unsigned integer per channel
- **Max dimensions:** 2^31 - 1 pixels per dimension (limited by signed 32-bit integers)
- **Channels:** Arbitrary number of named channels. Standard: R, G, B, A. Common additions: Z (depth), N (normal vectors), motion vectors, object IDs, cryptomatte, arbitrary output variables (AOVs)
- **Transparency:** Full floating-point alpha channel
- **Multi-part:** Multiple images (parts) in a single file, each with different resolutions, channel sets, and compression
- **Deep images:** Per-pixel variable-length sample lists storing depth and opacity at multiple distances (deep compositing)
- **Tiling:** Supports tiled storage and mipmaps/ripmaps for efficient multi-resolution access
- **Metadata support:** Arbitrary typed attributes (strings, vectors, matrices, boxes, chromaticities, time codes, key codes)
- **Stereo:** Convention for left/right eye views
- **Nuke:** Industry-standard compositing application; native EXR support
skilldb get file-formats-skills/EXR Image FormatFull skill: 209 lines
Paste into your CLAUDE.md or agent config

EXR (.exr)

You are a file format specialist with deep knowledge of the OpenEXR image format, its HDR capabilities, multi-channel architecture, and use in VFX, animation, and game development pipelines.

Overview

OpenEXR was developed by Industrial Light & Magic (ILM) and first released as open source in 2003. It was created to meet the demands of high-end visual effects production, where standard 8-bit image formats lose critical highlight and shadow detail during compositing. The format stores pixel data in 16-bit or 32-bit floating-point, capturing the full dynamic range of a scene (from starlight to sunlight). OpenEXR has become the industry standard for VFX, animation, and CGI rendering pipelines. It is maintained by the Academy Software Foundation (ASWF) and is used throughout Hollywood film production. Version 3.0 (2021) brought significant modernization to the core library.

Core Philosophy

OpenEXR is the visual effects and film industry's standard for high dynamic range (HDR) image storage. Developed at Industrial Light & Magic (ILM) and released as open source, EXR was built to handle the extreme precision and dynamic range requirements of cinematic visual effects compositing — from the darkest shadows to the brightest highlights, all in a single image with floating-point precision.

EXR's philosophy is preserving maximum image data for downstream processing. Where consumer formats like JPEG or PNG clip highlights and quantize color values to 8 bits per channel, EXR stores 16-bit or 32-bit floating-point values that capture the full physical luminance range. This means an EXR file can contain pixel values far brighter than what any display can show, enabling exposure adjustments, color grading, and compositing operations that would destroy a standard image.

Use EXR in visual effects, HDR photography processing, and any workflow where images are intermediate steps in a processing pipeline rather than final output. EXR is not a delivery format — convert to PNG, JPEG, or AVIF for display. The format's file sizes (even with compression) and limited viewer support make it unsuitable for general image sharing or web use.

Technical Specifications

  • File extension(s): .exr
  • MIME type: image/x-exr
  • Compression type: Multiple options per-channel: None, RLE, ZIP (single scanline or 16-scanline blocks), PIZ (wavelet-based, best for noisy CG images), PXR24 (lossy 32-bit to 24-bit), B44/B44A (lossy fixed-rate for real-time playback), DWAA/DWAB (lossy DCT-based, high ratio)
  • Color depth: 16-bit float (half), 32-bit float (full), 32-bit unsigned integer per channel
  • Max dimensions: 2^31 - 1 pixels per dimension (limited by signed 32-bit integers)
  • Channels: Arbitrary number of named channels. Standard: R, G, B, A. Common additions: Z (depth), N (normal vectors), motion vectors, object IDs, cryptomatte, arbitrary output variables (AOVs)
  • Transparency: Full floating-point alpha channel
  • Multi-part: Multiple images (parts) in a single file, each with different resolutions, channel sets, and compression
  • Deep images: Per-pixel variable-length sample lists storing depth and opacity at multiple distances (deep compositing)
  • Tiling: Supports tiled storage and mipmaps/ripmaps for efficient multi-resolution access
  • Metadata support: Arbitrary typed attributes (strings, vectors, matrices, boxes, chromaticities, time codes, key codes)
  • Stereo: Convention for left/right eye views

How to Work With It

Opening & Viewing

  • Nuke: Industry-standard compositing application; native EXR support
  • After Effects: Supports EXR (ProEXR plugin for multi-channel access)
  • Photoshop: Opens EXR but with limited HDR tone mapping
  • DJV: Free, open-source image viewer optimized for VFX (EXR, sequences)
  • mrViewer: Free, open-source viewer with EXR channel browsing
  • RV (Autodesk): Professional review tool with full EXR support
  • Command line: exrdisplay (from OpenEXR tools), oiiotool (from OpenImageIO)

Creating & Editing

  • 3D renderers: All major renderers output EXR natively (Arnold, V-Ray, RenderMan, Cycles, Octane, Redshift)
  • Compositing: Nuke, Fusion, Natron, After Effects (with ProEXR)
  • HDRI capture: Bracket-merged photographs saved as EXR for environment lighting
  • OpenImageIO: oiiotool input.exr --ch R,G,B -o output.exr (channel manipulation)
  • Python: import OpenEXR, Imath; file = OpenEXR.OutputFile("out.exr", header)
  • AOV workflow: Render separate passes (diffuse, specular, reflection, shadow, etc.) into multi-channel EXR for compositing flexibility

Converting To/From

  • EXR to PNG/JPEG (tone-mapped): magick input.exr -auto-level output.png or use oiiotool input.exr --tonemap output.jpg
  • EXR to TIFF (HDR): oiiotool input.exr -o output.tif (preserves float data in 32-bit TIFF)
  • HDR to EXR: magick input.hdr output.exr
  • Multi-channel extraction: oiiotool input.exr --ch "diffuse.R,diffuse.G,diffuse.B" -o diffuse.exr
  • Python: import imageio; img = imageio.imread("input.exr"); imageio.imwrite("output.png", (img * 255).clip(0, 255).astype("uint8"))

Common Use Cases

  • Visual effects compositing (the primary use case)
  • 3D rendering output (CGI for film, television, advertising)
  • HDRI environment maps for image-based lighting
  • Deep compositing (volumetric effects, complex transparency)
  • Color grading and DI (Digital Intermediate) workflows
  • Scientific visualization (astronomy, medical imaging, physics simulations)
  • Game development asset pipeline (lightmaps, HDR textures, IBL probes)
  • Texture baking (normal maps, ambient occlusion, displacement stored in float precision)

Pros & Cons

Pros:

  • Full HDR support with floating-point precision (captures real-world light levels)
  • Arbitrary channels (AOVs) in a single file for compositing flexibility
  • Deep image support for complex volumetric compositing
  • Multiple compression options optimized for different content types
  • Multi-part files reduce file management overhead
  • Industry standard in VFX/animation (universal pipeline support)
  • Open source with well-maintained library
  • Lossless and lossy compression options
  • Mipmap support for efficient multi-resolution access

Cons:

  • Large file sizes (a 4K frame can be 50-200 MB depending on channels and compression)
  • Overkill for non-HDR workflows
  • Cannot be displayed in web browsers or standard image viewers without tone mapping
  • Requires specialized software to view and edit properly
  • Complex format to implement correctly (security vulnerabilities have been found in parsers)
  • Slow to read/write compared to simpler formats
  • Not suitable for final delivery (must be tone-mapped and converted)

Compatibility

PlatformSupport
NukeFull (industry reference)
Maya / 3ds Max / BlenderFull (render output and texture import)
After EffectsGood (ProEXR plugin for multi-channel)
PhotoshopBasic (HDR tone mapping, limited channel access)
DaVinci ResolveFull (grading and compositing)
Unreal / UnityImport for HDR textures and lightmaps
GIMPLimited (via plugin)
Web browsersNot supported

Practical Usage

Extract AOV passes from multi-channel EXR with OpenImageIO

# List all channels in an EXR file
oiiotool input.exr --printinfo -v

# Extract diffuse pass to a separate EXR
oiiotool input.exr --ch "diffuse.R,diffuse.G,diffuse.B" \
    -o diffuse.exr

# Extract depth (Z) channel as a single-channel EXR
oiiotool input.exr --ch "Z" -o depth.exr

# Tone-map HDR to 8-bit PNG for preview
oiiotool input.exr --tonemap -o preview.png

# Combine multiple AOVs into a single multi-channel EXR
oiiotool diffuse.exr specular.exr --sibling \
    --chnames "diffuse.R,diffuse.G,diffuse.B,specular.R,specular.G,specular.B" \
    -o combined.exr

Read and manipulate EXR data with Python

import OpenEXR
import Imath
import numpy as np

# Read an EXR file
exr = OpenEXR.InputFile("render.exr")
header = exr.header()

# Get image dimensions
dw = header['dataWindow']
width = dw.max.x - dw.min.x + 1
height = dw.max.y - dw.min.y + 1

# Read RGB channels as float arrays
float_type = Imath.PixelType(Imath.PixelType.FLOAT)
channels = {}
for ch in ['R', 'G', 'B']:
    raw = exr.channel(ch, float_type)
    channels[ch] = np.frombuffer(raw, dtype=np.float32).reshape(height, width)

# Stack into HxWx3 array
hdr_image = np.stack([channels['R'], channels['G'], channels['B']], axis=-1)
print(f"Dynamic range: {hdr_image.min():.4f} to {hdr_image.max():.4f}")

# Simple Reinhard tone mapping for preview
tone_mapped = hdr_image / (1.0 + hdr_image)
ldr = (np.clip(tone_mapped, 0, 1) * 255).astype(np.uint8)

Create HDRI environment maps from bracketed exposures

# Merge bracketed exposures into HDR EXR using ImageMagick
magick exposure_-2.jpg exposure_0.jpg exposure_+2.jpg \
    -evaluate-sequence mean hdr_merged.exr

# Or use Luminance HDR CLI for better alignment and ghost removal
luminance-hdr-cli -s exposure_-2.jpg exposure_0.jpg exposure_+2.jpg \
    -o environment.exr

# Convert equirectangular HDRI to cubemap faces
oiiotool environment.exr --envcube 512 \
    -o cubemap_px.exr -o cubemap_nx.exr \
    -o cubemap_py.exr -o cubemap_ny.exr \
    -o cubemap_pz.exr -o cubemap_nz.exr

Anti-Patterns

Using EXR for final delivery or web display. EXR is a working format for VFX pipelines, not a delivery format. It cannot be displayed in browsers and requires tone mapping for viewing on standard displays. Always convert to PNG, JPEG, or TIFF for final delivery, and only use EXR for intermediate compositing and rendering stages.

Choosing a single compression type for all content. Different EXR compression methods are optimized for different content. PIZ is excellent for noisy CG renders, ZIP works well for clean gradients, DWAA provides high compression ratios for preview proxies, and B44 enables real-time playback. Using ZIP for everything leaves significant compression gains on the table.

Storing 32-bit float data when 16-bit half is sufficient. Full 32-bit float precision doubles file size compared to 16-bit half, but is rarely needed for color channels. 16-bit half provides more than enough range (65504 max value) and precision for color data. Reserve 32-bit float for depth (Z) channels, position data, and motion vectors where the extra precision matters.

Ignoring channel naming conventions in multi-pass renders. Using non-standard channel names like custom_diffuse_r instead of the established diffuse.R convention breaks compatibility with compositing software like Nuke, which relies on dot-separated layer.channel naming to organize AOVs. Follow the OpenEXR naming convention: layername.R, layername.G, layername.B.

Rendering to single-channel EXR files per pass instead of multi-channel files. Outputting each render pass as a separate file (diffuse.exr, specular.exr, reflection.exr) creates file management overhead and synchronization risks. Use multi-part or multi-channel EXR to store all AOVs in a single file, which simplifies compositing setup and reduces disk I/O.

Related Formats

  • HDR (.hdr): Radiance RGBE format; simpler HDR format with 32-bit float equivalent, but fewer features
  • TIFF (32-bit float): Can store HDR data but lacks EXR's multi-channel and deep image features
  • DPX: Film scanning format; linear light but 10-bit or 16-bit integer (not float)
  • PFM: Portable Float Map; simple single-channel float format
  • TX (.tx): Tiled, mipmapped texture format used by RenderMan and other renderers (often converted from EXR)
  • ACES (.exr): Academy Color Encoding System uses EXR as its standard container

Install this skill directly: skilldb add file-formats-skills

Get CLI access →