Simple EXR
A simple Python library for reading and writing OpenEXR files using numpy arrays.
Installation
pip install simple-exr
Quick Start
Reading EXR Files
import simple_exr
import numpy as np
# Read an EXR file
image = simple_exr.read_exr("path/to/image.exr")
print(f"Image shape: {image.shape}") # (height, width, channels)
print(f"Image dtype: {image.dtype}") # float32
Writing EXR Files
import simple_exr
import numpy as np
# Create a sample RGB image
height, width = 512, 512
rgb_image = np.random.rand(height, width, 3).astype(np.float32)
# Write to EXR file
simple_exr.write_exr("output.exr", rgb_image)
# Create a sample RGBA image
rgba_image = np.random.rand(height, width, 4).astype(np.float32)
# Write RGBA to EXR file
simple_exr.write_exr("output_rgba.exr", rgba_image)
API Reference
read_exr(path: str) -> np.ndarray
Read an EXR file and return it as a numpy array.
Parameters:
path(str): Path to the EXR file
Returns:
np.ndarray: Image data as (H, W, C) array where C is 3 (RGB) or 4 (RGBA)
Raises:
ValueError: If no RGB(A) channels are found in the EXR fileFileNotFoundError: If the file doesn't exist
write_exr(path: str, img: np.ndarray)
Write a numpy array to an EXR file as RGB or RGBA depending on channel count.
Parameters:
path(str): Output path for the EXR fileimg(np.ndarray): Image data with shape (H, W, 3) or (H, W, 4), dtype float32 or float64
Raises:
ValueError: If img doesn't have 3 or 4 channels
Metadata
Release files for simple-exr 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simple_exr-0.0.0.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_exr-0.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / simple_exr-0.0.0.tar.gz
| Download URL | simple_exr-0.0.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec915395acfb116e05f08e9efcc73fbf26d33eb7ff539d82e40e2195fffe3e48
|
|
BLAKE2b-256 checksum How to use checksums |
79b2c7e75f074f723c5e89a19960934c219d532d6b3fe38d956be72ea4dc73d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2025.
Transparency logRelease files / simple_exr-0.0.0-py3-none-any.whl
| Download URL | simple_exr-0.0.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd4d886bfce82f7b5f618c9f854388c7e347d42b1bd14ee6986fe91b58bc2022
|
|
BLAKE2b-256 checksum How to use checksums |
c0f7adb8c825334a2ed736b982cbb28f3f95be2759c1ac18303c70bdb6dddedb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2025.
Transparency log