Table of Contents

Class ExrPart

Namespace
Egami.Formats.Exr
Assembly
Egami.dll

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

IReadOnlyList<ExrHeaderEntry>

Channels

Gets the channels, in the file's (alphabetical) order.

public IReadOnlyList<ExrChannel> Channels { get; init; }

Property Value

IReadOnlyList<ExrChannel>

Chromaticities

Gets the chromaticities attribute, or null when absent (Rec. 709 is meant then).

public ColorPrimaries? Chromaticities { get; init; }

Property Value

ColorPrimaries

ColorInteropId

Gets the colorInteropID attribute, such as "lin_rec709_scene", or null.

public string? ColorInteropId { get; init; }

Property Value

string

Compression

Gets the compression.

public ExrCompression Compression { get; init; }

Property Value

ExrCompression

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

Rect

DecreasingY

Gets whether scanline blocks are stored bottom first.

public bool DecreasingY { get; init; }

Property Value

bool

DisplayWindow

Gets the display window: the area the image is meant to be seen in.

public Rect DisplayWindow { get; init; }

Property Value

Rect

FramesPerSecond

Gets the framesPerSecond attribute, or null.

public double? FramesPerSecond { get; init; }

Property Value

double?

Kind

Gets how the part stores its pixels.

public ExrPartKind Kind { get; init; }

Property Value

ExrPartKind

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

IReadOnlyList<string>

LevelMode

Gets the resolution levels of a tiled part.

public ExrLevelMode LevelMode { get; init; }

Property Value

ExrLevelMode

Name

Gets the part's name, or an empty string in a single-part file without one.

public string Name { get; init; }

Property Value

string

PixelAspectRatio

Gets the width of a pixel over its height.

public double PixelAspectRatio { get; init; }

Property Value

double

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

ulong?

View

Gets the view attribute of a multi-view file, such as "left", or null.

public string? View { get; init; }

Property Value

string

WhiteLuminance

Gets the whiteLuminance attribute: the luminance, in cd/m², of RGB (1, 1, 1), or null.

public double? WhiteLuminance { get; init; }

Property Value

double?