OpenExrWindows Class

The immutable windows of an OpenEXR file (its dataWindow and displayWindow attributes), in the pixel coordinates of the file: the corners of each window, both inclusive.

public sealed class OpenExrWindows : IEquatable<OpenExrWindows>

Remarks

The display window is the area the image is meant to show, and the data window the pixels the file stores. The decoded image covers one of them (OpenExrDecodingOptions.WindowMode): its pixel (0, 0) is OpenExrWindows.DisplayWindowMin, or OpenExrWindows.DataWindowMin with OpenExrWindowMode.DataWindow.

Implements

Constructors

NameDescription
OpenExrWindows(Point, Point, Point, Point)Initializes a new instance of the OpenExrWindows class.

OpenExrWindows(Point, Point, Point, Point)

OpenExrWindows.cs

Initializes a new instance of the OpenExrWindows class.

public OpenExrWindows(Point dataWindowMin, Point dataWindowMax, Point displayWindowMin, Point displayWindowMax)

Parameters

dataWindowMin Point
The top-left pixel of the data window.
dataWindowMax Point
The bottom-right pixel of the data window.
displayWindowMin Point
The top-left pixel of the display window.
displayWindowMax Point
The bottom-right pixel of the display window.

Exceptions

ArgumentException
A window is empty: its bottom-right pixel is above or to the left of its top-left pixel.

Properties

NameDescription
DataWindowMaxGets the bottom-right pixel of the data window (inclusive).
DataWindowMinGets the top-left pixel of the data window.
DisplayWindowMaxGets the bottom-right pixel of the display window (inclusive).
DisplayWindowMinGets the top-left pixel of the display window.

DataWindowMax

OpenExrWindows.cs

Gets the bottom-right pixel of the data window (inclusive).

public Point DataWindowMax { get; }

Property value

Point

DataWindowMin

OpenExrWindows.cs

Gets the top-left pixel of the data window.

public Point DataWindowMin { get; }

Property value

Point

DisplayWindowMax

OpenExrWindows.cs

Gets the bottom-right pixel of the display window (inclusive).

public Point DisplayWindowMax { get; }

Property value

Point

DisplayWindowMin

OpenExrWindows.cs

Gets the top-left pixel of the display window.

public Point DisplayWindowMin { get; }

Property value

Point

Methods

NameDescription
Equals(OpenExrWindows?)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Determines whether the specified object is equal to the current object.
GetHashCode()Serves as the default hash function.
ToString()Returns a string that represents the current object.

Equals overloads

Equals(OpenExrWindows?)

OpenExrWindows.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(OpenExrWindows? other)
Parameters
other OpenExrWindows?
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

OpenExrWindows.cs

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current object.
Returns

bool true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

OpenExrWindows.cs

Serves as the default hash function.

public override int GetHashCode()

Returns

int A hash code for the current object.

Returns a string that represents the current object.

public override string ToString()

Returns

string A string that represents the current object.