Skip to main content

Module hdr

Module hdr 

Source
Expand description

High dynamic range images (Radiance HDR and OpenEXR): decoding to linear floating point and tone mapping for display.

Eagle tone-maps these with Reinhard at an exposure of 1.0 and sRGB output; tone_map does the same per channel: scale by the exposure, c / (1 + c), then the linear to sRGB encode.

Functions§

decode_linear
Decodes path to linear RGBA floats, turned by its orientation if any.
is_hdr
Whether ext (lowercase) is a high dynamic range format.
stops_to_exposure
Exposure multiplier for a slider in stops (EV): 2^stops.
tone_map
Tone maps linear img for display: Reinhard at exposure (a multiplier, see stops_to_exposure), sRGB encoded. Alpha is the image’s own, clamped to 0..1 (Radiance files have none, so it is 1).