Class ExrReaderOptions
Options for reading OpenEXR, on top of the general ReaderOptions.
public sealed record ExrReaderOptions : ReaderOptions, IEquatable<ReaderOptions>, IEquatable<ExrReaderOptions>
- Inheritance
-
ExrReaderOptions
- Implements
- Inherited Members
Examples
// The first part's RGBA channels as linear light, 1.0 reference white; other layers by name.
using Raster<RgbaF32> beauty = Raster.Load<RgbaF32>("render.exr");
var details = (ExrDetails)beauty.Metadata.FormatDetails!;
IReadOnlyList<string> layers = details.Parts[details.Part].Layers; // "diffuse", "specular"
using Raster<RgbaF32> diffuse = Raster.Load<RgbaF32>("render.exr", options: new ExrReaderOptions { Layer = "diffuse" });
// Any one channel, such as depth or an object id, as 32-bit float.
using Raster<GrayF32> depth = ExrImage.ReadChannel("aov.exr", "Z");
Properties
Default
Gets the default options.
public static ExrReaderOptions Default { get; }
Property Value
Layer
Gets the layer to read, such as "diffuse" for diffuse.R, diffuse.G, diffuse.B and diffuse.A. Defaults to null: the channels without a layer, or the first layer with color channels when there are none.
public string? Layer { get; init; }
Property Value
Part
Gets the index of the part to read. Defaults to 0; LoadAll(Stream, EgamiContext?, ReaderOptions?) reads every part.
public int Part { get; init; }
Property Value
Window
Gets which window the raster covers. Defaults to Data.
public ExrWindow Window { get; init; }