tfg.io.exr.read_exr
Opens an EXR file and copies the requested channels into an ndarray.
tfg.io.exr.read_exr(
filename, channel_names=None
)
The Python OpenEXR wrapper uses a dictionary for the channel header, so the
ordering of the channels in the underlying file is lost. If channel_names is
not passed, this function orders the output channels with any present RGBA
channels first, followed by the remaining channels in alphabetical order.
By convention, RGBA channels are named 'R', 'G', 'B', 'A', so this function
looks for those strings.
Args |
filename
|
The name of the EXR file.
|
channel_names
|
A list of strings naming the channels to read. If None, all
channels will be read.
|
Returns |
A numpy array containing the image data, and a list of the corresponding
channel names.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-10-28 UTC.
[null,null,["Last updated 2022-10-28 UTC."],[],[]]