Enum ExrPixelType
The type of an OpenEXR channel's samples.
[SuppressMessage("Naming", "CA1720:Identifier contains type name", Justification = "These are OpenEXR's names for its pixel types.")]
public enum ExrPixelType
Fields
Float = 232-bit floating point.
Half = 116-bit floating point.
UInt = 032-bit unsigned integers, such as object IDs.
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");