Skip to main content

encode_to

Function encode_to 

Source
pub fn encode_to<W: Write>(
    format: HeightmapFormat,
    elevations: &[f32],
    writer: W,
) -> Result<()>
Expand description

Encode elevations into RGB bytes streamed to a writer.

Uses a 4 KiB stack-allocated chunk to amortise per-call write overhead.