需先按官方 Install 文档安装所需前置依赖;链接时需使用 OpenEXR::OpenEXR 目标并指定库路径;仅适用于 2D 数据,不适合体数据或 3D 场景存储
openexr
AcademySoftwareFoundationBSD-3-Clause活跃维护影视工业级 HDR 图像存储格式 EXR 的规范与参考实现,提供高动态范围、多通道图像读写能力,适合 VFX 和后期制作流程。
The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
cmake -S . -B _build -DCMAKE_PREFIX_PATH=<path to OpenEXR libraries/includes>
cmake --build _buildREADME 未说明
影视工业级 EXR 高动态范围图像格式的规范与参考实现,用于精确存储场景线性图像
影视工业级 HDR 图像存储格式 EXR 的规范与参考实现,提供高动态范围、多通道图像读写能力,适合 VFX 和后期制作流程。
核心能力
- 提供 EXR 格式规范与 C++ 参考实现
- 支持高动态范围场景线性数据与元数据
- 支持多部件、多通道图像存储
- 面向渲染、合成、深度合成与 DI 等场景
- 跨 Linux、Windows、macOS 多平台
容易踩的坑
- v3.4.18最新正式版2026-11-08 · 2026-11-08 21:59 UTC
Patch release that addresses a regression introduced in v3.3.0 that leads to excessive memory usage during write, especially with DWA compression (Issue #2791).
This release also addresses the following security vulnerabilities:
- CVE Pending (GHSA-PP92-4RV3-WFQ6) OpenEXR: a signed-int data-window-origin overflow in the OpenEXRUtil Image API turns
Imf::loadImageinto an attacker-steered out-of-bounds write - CVE Pending (GHSA-2V77-PVHX-25C3) Integer overflow in legacy
OpenEXR.OutputFile.writePixels()causes heap over-read
- CVE Pending (GHSA-PP92-4RV3-WFQ6) OpenEXR: a signed-int data-window-origin overflow in the OpenEXRUtil Image API turns
- v3.3.162026-11-08 · 2026-11-08 21:58 UTC
查看更新说明
Patch release that addresses a regression introduced in v3.3.0 that leads to excessive memory usage during write, especially with DWA compression (Issue #2791).
This release also addresses the following security vulnerabilities:
- CVE Pending (GHSA-PP92-4RV3-WFQ6) OpenEXR: a signed-int data-window-origin overflow in the OpenEXRUtil Image API turns
Imf::loadImageinto an attacker-steered out-of-bounds write - CVE Pending (GHSA-2V77-PVHX-25C3) Integer overflow in legacy
OpenEXR.OutputFile.writePixels()causes heap over-read
- CVE Pending (GHSA-PP92-4RV3-WFQ6) OpenEXR: a signed-int data-window-origin overflow in the OpenEXRUtil Image API turns
- v3.5.32026-10-31 · 2026-10-31 14:34 UTC
查看更新说明
Patch release that addresses 15 security vulnerabilities, 10 with pending CVE IDs, primarily heap buffer overflows and out-of-bounds writes triggered by malformed or malicious EXR files — several capable of remote code execution. See the Security section below for details.
This release includes no new features or changes in behavior other than improved error detection and rejection of invalid input, except for a fix for a regression introduced in v3.4.14 in reading deep images on big-endian hosts, due to a byte-order bug that returned an incorrect deep sample count table. Little-endian hosts are unaffected.
As part of this effort, the full test suite now passes cleanly under the address, undefined-behavior, and thread sanitizers.
Also in this release:
- Add support for Python 3.15
- Several diagnostic/correctness fixes across the utility tools (exrmetrics, exrmultipart, exrcheck) and core decompression paths (courtesy of @ssoj13/Alex Khal)
- Address several long-standing build errors and test failures on i686 (32-bit linux) and s390x (big-endian) hosts.
- Fix build issues on macOS < 10.15
- Fix build issues on powerpc
- Fix for absolute paths for
libmin OpenEXRTargets.cmake - Fix for running on Windows 7 involving
CreateFile2
Security
This release addresses the following security vulnerabilities:
- CVE Pending (GHSA-WHF5-29MJ-GP53) Heap Out-of-Bounds Write via Signed Integer Overflow in DWAA/DWAB LossyDctDecoder
- CVE Pending (GHSA-VP77-HHRC-M2C3) Subsampled chunk-height miscount: heap overflow in B44 encoder, NULL dereference in DWA decoder/encoder
- CVE Pending (GHSA-RXWG-X3WX-PGFH) Heap out-of-bounds write via 32-bit tile-area integer overflow in DeepTiledOutputFile (deep-image re-save path) — possible incomplete fix of PR #939
- CVE Pending (GHSA-RJG8-982X-JHC2) Uninitialized Heap Memory Disclosure in DWA Decompression via Short zlib Stream Mapped to Success
- CVE Pending (GHSA-J76P-H7GW-VMPF) Heap buffer overflow in the OpenEXR Python bindings when two RGB channel groups coalesce to the same key
- CVE Pending (GHSA-G248-596F-9995) Unvalidated extra
chlistheader attributes merged intoHeader::channels()cause a heap overflow inrun_fill - CVE Pending (GHSA-FRX8-5P4H-J8M7) Heap OOB Write via Integer Overflow in B44 Chunk Unpacked-Size Computation — Remote Code Execution in OpenEXRCore
- CVE Pending (GHSA-98RX-QPFV-QCWV) Missing grid-total bound in ZSTD deep decode causes heap out-of-bounds write in OpenEXRCore
- CVE Pending (GHSA-638X-X7MR-89XC) Out-of-bounds write at an attacker-chosen displacement in legacy Python InputFile.channel()
- CVE Pending (GHSA-6358-7H9P-8G5C) Heap buffer overflow in OpenEXRCore ZSTD deep decode via unvalidated signed sample counts
- CVE Pending (GHSA-3CP4-779M-H837) Use-after-free in OpenEXRCore exr_copy_unset_attributes() when a channel name
- v3.4.172026-10-31 · 2026-10-31 13:56 UTC
查看更新说明
Patch release that addresses the following security vulnerabilities:
- CVE Pending (GHSA-WHF5-29MJ-GP53) Heap Out-of-Bounds Write via Signed Integer Overflow in DWAA/DWAB
LossyDctDecoder - CVE Pending (GHSA-VP77-HHRC-M2C3) Subsampled chunk-height miscount: heap overflow in B44 encoder, NULL dereference in DWA decoder/encoder
- CVE Pending (GHSA-RXWG-X3WX-PGFH) Heap out-of-bounds write via 32-bit tile-area integer overflow in
DeepTiledOutputFile(deep-image re-save path) — possible incomplete fix of PR #939 - CVE Pending (GHSA-RJG8-982X-JHC2) Uninitialized Heap Memory Disclosure in DWA Decompression via Short zlib Stream Mapped to Success
- CVE Pending (GHSA-J76P-H7GW-VMPF) Heap buffer overflow in the OpenEXR Python bindings when two RGB channel groups coalesce to the same key
- CVE Pending (GHSA-G248-596F-9995) Unvalidated extra
chlistheader attributes merged intoHeader::channels()cause a heap overflow inrun_fill - CVE Pending (GHSA-FRX8-5P4H-J8M7) Heap OOB Write via Integer Overflow in B44 Chunk Unpacked-Size Computation — Remote Code Execution in OpenEXRCore
- CVE Pending (GHSA-638X-X7MR-89XC) Out-of-bounds write at an attacker-chosen displacement in legacy Python
InputFile.channel() - CVE Pending (GHSA-3CP4-779M-H837) Use-after-free in OpenEXRCore
exr_copy_unset_attributes()when a channel name exceeds 31 bytes
This version also addresses a regression introduced in v3.4.14 in reading deep images on big-endian hosts, due to a byte-order bug in the deep sample count table. Little-endian hosts are unaffected.
See CHANGES.md for more details.
Contributors
- CVE Pending (GHSA-WHF5-29MJ-GP53) Heap Out-of-Bounds Write via Signed Integer Overflow in DWAA/DWAB
- v3.3.152026-10-31 · 2026-10-31 13:29 UTC
查看更新说明
Patch release that addresses the following security vulnerabilities:
- CVE Pending (GHSA-WHF5-29MJ-GP53) Heap Out-of-Bounds Write via Signed Integer Overflow in DWAA/DWAB
LossyDctDecoder - CVE Pending (GHSA-RXWG-X3WX-PGFH) Heap out-of-bounds write via 32-bit tile-area integer overflow in
DeepTiledOutputFile(deep-image re-save path) — possible incomplete fix of PR #939 - CVE Pending (GHSA-RJG8-982X-JHC2) Uninitialized Heap Memory Disclosure in DWA Decompression via Short zlib Stream Mapped to Success
- CVE Pending (GHSA-J76P-H7GW-VMPF) Heap buffer overflow in the OpenEXR Python bindings when two RGB channel groups coalesce to the same key
- CVE Pending (GHSA-G248-596F-9995) Unvalidated extra
chlistheader attributes merged intoHeader::channels()cause a heap overflow inrun_fill - CVE Pending (GHSA-FRX8-5P4H-J8M7) Heap OOB Write via Integer Overflow in B44 Chunk Unpacked-Size Computation — Remote Code Execution in OpenEXRCore
- CVE Pending (GHSA-638X-X7MR-89XC) Out-of-bounds write at an attacker-chosen displacement in legacy Python
InputFile.channel() - CVE Pending (GHSA-3CP4-779M-H837) Use-after-free in OpenEXRCore
exr_copy_unset_attributes()when a channel name exceeds 31 bytes
See CHANGES.md for more details.
Contributors
- CVE Pending (GHSA-WHF5-29MJ-GP53) Heap Out-of-Bounds Write via Signed Integer Overflow in DWAA/DWAB
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
OpenEXR
OpenEXR provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
The purpose of EXR format is to accurately and efficiently represent high-dynamic-range scene-linear image data and associated metadata, with strong support for multi-part, multi-channel use cases.
OpenEXR is widely used in host application software where accuracy is critical, such as photorealistic rendering, texture access, image compositing, deep compositing, and DI.
OpenEXR Project Mission
The goal of the OpenEXR project is to keep the EXR format reliable and modern and to maintain its place as the preferred image format for entertainment content creation.
Major revisions are infrequent, and new features will be carefully weighed against increased complexity. The principal priorities of the project are:
- Robustness, reliability, security
- Backwards compatibility, data longevity
- Performance - read/write/compression/decompression time
- Simplicity, ease of use, maintainability
- Wide adoption, multi-platform support - Linux, Windows, macOS, and others
OpenEXR is intended solely for 2D data. It is not appropriate for storage of volumetric data, cached or lit 3D scenes, or more complex 3D data such as light fields.
The goals of the Imath project are simplicity, ease of use, correctness and verifiability, and breadth of adoption. Imath is not intended to be a comprehensive linear algebra or numerical analysis package.
Project Governance
OpenEXR is a project of the Academy Software Foundation. See the project's governance policies, contribution guidelines, and code of conduct for more information.
Building OpenEXR
See the Install instructions for instructions on how to build OpenEXR and its required prerequisites.
Quick Start
See the technical documentation for
complete details, but to get started, the "Hello, world" exrwriter.cpp writer program is:
#include <ImfRgbaFile.h>
#include <ImfArray.h>
#include <iostream>
using namespace OPENEXR_IMF_NAMESPACE;
int
main()
{
int width = 100;
int height = 50;
Array2D<Rgba> pixels(height, width);
for (int y=0; y<height; y++)
{
float c = (y / 5 % 2 == 0) ? (y / (float) height) : 0.0;
for (int x=0; x<width; x++)
pixels[y][x] = Rgba(c, c, c);
}
try {
RgbaOutputFile file ("stripes.exr", width, height, WRITE_RGBA);
file.setFrameBuffer (&pixels[0][0], 1, width);
file.writePixels (height);
} catch (const std::exception &e) {
std::cerr << "error writing image file stripes.exr:" << e.what() << std::endl;
return 1;
}
return 0;
}
This creates an image 100 pixels wide and 50 pixels high with
horizontal stripes 5 pixels high of graduated intensity, bright on the
bottom of the image and dark towards the top. Note that pixel[0][0]
is in the upper left:

The CMakeLists.txt to build:
cmake_minimum_required(VERSION 3.12)
project(exrwriter)
find_package(OpenEXR REQUIRED)
add_executable(${PROJECT_NAME} exrwriter.cpp)
target_link_libraries(${PROJECT_NAME} OpenEXR::OpenEXR)
To build:
$ cmake -S . -B _build -DCMAKE_PREFIX_PATH=<path to OpenEXR libraries/includes>
$ cmake --build _build
For more details, see The OpenEXR API.
Community
-
Ask a question:
-
Email: [email protected]
-
Slack: academysoftwarefdn#openexr
-
-
Attend a meeting:
-
Technical Steering Committee meetings are open to the public, fortnightly on Thursdays, 1:30pm Pacific Time.
-
Calendar: https://zoom-lfx.platform.linuxfoundation.org/meetings/openexr
-
Meeting Notes: https://wiki.aswf.io/display/OEXR/TSC+Meetings
-
-
Report a bug:
- Submit an Issue: https://github.com/AcademySoftwareFoundation/openexr/issues
-
Report a security vulnerability:
- File a GitHub security advisory. Email [email protected] for private/secure discussion with the project maintainers.
-
Contribute a Fix, Feature, or Improvement:
-
Read the Contribution Guidelines and Code of Conduct
-
Sign the Contributor License Agreement
-
Submit a Pull Request: https://github.com/AcademySoftwareFoundation/openexr/pulls
-
If you'd like to contribute and could use some ideas of what to do, browse "good first issues" here or on Clotributor.
-
Resources
- Website: http://www.openexr.com
- Technical documentation: https://openexr.readthedocs.io
- Porting help: OpenEXR/Imath Version 2.x to 3.x Porting Guide
- Reference images: https://github.com/AcademySoftwareFoundation/openexr-images
- Security policy: SECURITY.md
- Release notes: CHANGES.md
- Contributors: CONTRIBUTORS.md
License
OpenEXR is licensed under the BSD-3-Clause license.
