Class RadianceWriterOptions
Options for writing Radiance pictures: RGBE with per-channel run-length encoding, top row first.
public sealed class RadianceWriterOptions : WriterOptions
- Inheritance
-
RadianceWriterOptions
- 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
Compress
Gets whether to run-length encode each row, as Radiance itself does. Defaults to true.
public bool Compress { get; init; }
Property Value
Default
Gets the default options.
public static RadianceWriterOptions Default { get; }
Property Value
Exposure
Gets the EXPOSURE line to write, or null (the default) for none. It only labels the file: the pixel values are written as they are.
public double? Exposure { get; init; }