Skip to main content

No project description provided

Project description

pyroexr

PyPI Downloads

This is a minimal Python wrapper around the Rust exr crate, which provides fast loading of OpenEXR files.

Note that this project only supports the functionality we currently need ourselves. For instance, the package assumes you want to load the entire file into memory and that there is only one layer in the file. I have no current plans to extend it further, but contributions are of course welcome.

Installation

The package can be installed directly from PyPI:

python -m pip install pyroexr

Usage

A file can be opened and its channels printed as follows:

import pyroexr

image = pyroexr.load("Ocean.exr")
print("Channels", image.channels())
Channels ['B', 'G', 'R']

Each channel can be accessed as a NumPy array, for instance to plot it in Matplotlib:

import matplotlib.pyplot as plt
plt.imshow(image.channel("B"))
plt.show()

Ocean output

Development

If you want to develop this package locally, use the maturin tool to build the Rust code and install the Python package in your current environment:

maturin develop

You can also use the maturin tool to build the wheels or publish the package. See the maturin documentation for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pyroexr-0.2.0-cp310-abi3-win_amd64.whl (335.9 kB view hashes)

Uploaded CPython 3.10+ Windows x86-64

pyroexr-0.2.0-cp310-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (412.8 kB view hashes)

Uploaded CPython 3.10+ manylinux: glibc 2.5+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page