Table of Contents

Class RadianceDetails

Namespace
Egami.Formats.Radiance
Assembly
Egami.dll

Details only Radiance pictures have, kept in FormatDetails.

public sealed class RadianceDetails : FormatDetails
Inheritance
RadianceDetails
Inherited Members

Examples

// Linear light, unclamped: 1.0 is reference white. The brightest value is measured as the light level ToneMap fits.
using Raster<RgbF32> hdr = Raster.Load<RgbF32>("desk.hdr");
var details = (RadianceDetails)hdr.Metadata.FormatDetails!;
double? exposure = details.Exposure;                    // the header's EXPOSURE lines; the pixels are kept as stored

// To SDR: tone map, then save. Saving the HDR raster to PNG or JPEG as it is would clip the highlights.
using Raster<RgbF32> mapped = hdr.Derive(ops => ops.ToneMap(ToneMapping.Bt2390));
mapped.Save("desk.jpg");

// RGBE with per-channel run-length scanlines, as Radiance writes them; EXPOSURE only when asked for.
hdr.Save("copy.hdr");
hdr.Save("labeled.hdr", new RadianceWriterOptions { Exposure = 1.5 });

Properties

ColorCorrection

Gets or sets the product of the COLORCORR lines, red, green and blue, or null when the header has none.

public (double Red, double Green, double Blue)? ColorCorrection { get; set; }

Property Value

(double Red, double Green, double Blue)?

Exposure

Gets or sets the product of the EXPOSURE lines: the factor the stored values were multiplied by after rendering, so the original radiance is the pixel value divided by it. null when the header has none. Egami keeps the stored values.

public double? Exposure { get; set; }

Property Value

double?

HeaderLines

Gets the header lines between the signature and the blank line, in file order, comments included.

public IList<string> HeaderLines { get; }

Property Value

IList<string>

Orientation

Gets or sets the resolution line as stored, such as "-Y 512 +X 768"; the raster is always top row first, left to right.

public string Orientation { get; set; }

Property Value

string

PixelAspectRatio

Gets or sets the product of the PIXASPECT lines (pixel height over width), or null.

public double? PixelAspectRatio { get; set; }

Property Value

double?

PixelFormat

Gets or sets what the stored pixels hold.

public RadiancePixelFormat PixelFormat { get; set; }

Property Value

RadiancePixelFormat

Primaries

Gets or sets the PRIMARIES line, or null when the header has none (Rec. 709 primaries are assumed then).

public ColorPrimaries? Primaries { get; set; }

Property Value

ColorPrimaries

Software

Gets or sets the SOFTWARE line, or null.

public string? Software { get; set; }

Property Value

string

View

Gets or sets the VIEW line, the camera the picture was rendered with, or null.

public string? View { get; set; }

Property Value

string

Methods

Copy()

Returns a deep copy.

public override FormatDetails Copy()

Returns

FormatDetails

The copy.