Class ExrPart
One part of an OpenEXR file, from its header.
public sealed record ExrPart : IEquatable<ExrPart>
- Inheritance
-
ExrPart
- 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
Attributes
Gets every attribute of the header, in file order, as stored.
public IReadOnlyList<ExrHeaderEntry> Attributes { get; init; }
Property Value
Channels
Gets the channels, in the file's (alphabetical) order.
public IReadOnlyList<ExrChannel> Channels { get; init; }
Property Value
Chromaticities
Gets the chromaticities attribute, or null when absent (Rec. 709 is meant then).
public ColorPrimaries? Chromaticities { get; init; }
Property Value
ColorInteropId
Gets the colorInteropID attribute, such as "lin_rec709_scene", or null.
public string? ColorInteropId { get; init; }
Property Value
Compression
Gets the compression.
public ExrCompression Compression { get; init; }
Property Value
DataWindow
Gets the data window: the area the file stores pixels for, which may lie partly outside the display window.
public Rect DataWindow { get; init; }
Property Value
DecreasingY
Gets whether scanline blocks are stored bottom first.
public bool DecreasingY { get; init; }
Property Value
DisplayWindow
Gets the display window: the area the image is meant to be seen in.
public Rect DisplayWindow { get; init; }
Property Value
FramesPerSecond
Gets the framesPerSecond attribute, or null.
public double? FramesPerSecond { get; init; }
Property Value
Kind
Gets how the part stores its pixels.
public ExrPartKind Kind { get; init; }
Property Value
Layers
Gets the layer names: the prefixes before the last dot of the channel names, such as "diffuse" for "diffuse.R".
public IReadOnlyList<string> Layers { get; init; }
Property Value
LevelMode
Gets the resolution levels of a tiled part.
public ExrLevelMode LevelMode { get; init; }
Property Value
Name
Gets the part's name, or an empty string in a single-part file without one.
public string Name { get; init; }
Property Value
PixelAspectRatio
Gets the width of a pixel over its height.
public double PixelAspectRatio { get; init; }
Property Value
TileSize
Gets the tile width and height of a tiled part, or null.
public Size? TileSize { get; init; }
Property Value
- Size?
TimeCode
Gets the timeCode attribute's time and control packet (SMPTE 12M), or null.
public ulong? TimeCode { get; init; }
Property Value
View
Gets the view attribute of a multi-view file, such as "left", or null.
public string? View { get; init; }
Property Value
WhiteLuminance
Gets the whiteLuminance attribute: the luminance, in cd/m², of RGB (1, 1, 1), or null.
public double? WhiteLuminance { get; init; }