Skip to main content

render_map

Function render_map 

Source
pub fn render_map(output: &mut [u8], width: usize, height: usize, map: &[f32])
Expand description

Paint map, one value per pixel of a width x height image, over an RGBA8 output buffer as an opaque grayscale image, bright where the perceived error is high. Values are clamped to 0..=1, the range the reference’s own colormap render assumes.

A no-op when map or output is too short for width * height.