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.