Class RadianceFormat
The Radiance picture format (.hdr, .pic), registered in Default.
public static class RadianceFormat
- Inheritance
-
RadianceFormat
- 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
Info
Gets the format's registration: name, MIME type, extensions, signature, reader and writer.
public static FormatInfo Info { get; }