surtgis v0.10.4
Patch release that adds in-tree PNG output. Pre-M1 for the
surtgis-relief crate (see SPEC_SURTGIS_RELIEF.md); doing this in
surtgis-colormap rather than surtgis-relief so every crate that
produces an RGBA buffer (curvature previews, hypsometric maps, fluvial
GeoJSON-paired rasters, future relief composites) can save PNG without
pulling its own dependency.
Added
RgbaImagestruct insurtgis_colormap::encodewith the row-major
RGBA pixel layout thatraster_to_rgbaalready produces. Methods:
from_rgba,from_intensity(single-channel[0, 1]raster →
greyscale),over(alpha-over composite),multiply(multiply blend
for shadows on a colored base).RgbaImage::to_png_bytes()andRgbaImage::save_png(path)for
native PNG output. Standalone helpersrgba_to_png_bytes(width, height, &[u8])andsave_png(path, …)are also re-exported at the
crate root.EncodeErrortyped viathiserror; includes shape-mismatch,
image::ImageError, andstd::io::Errorvariants.
Notes
- All PNG paths are gated on
cfg(not(target_arch = "wasm32")). The
imagecrate is added as a workspace-target dependency under the
same gate, so WASM builds stay lightweight. On WASM, consumers are
expected to pass the raw RGBA buffer back to JS, where the canvas or
Blob path encodes the image. - No algorithm changes elsewhere;
surtgis-core,surtgis-algorithms,
surtgis-parallel,surtgis-cloud,surtgis(CLI) ship unchanged
but bump in lockstep with the workspace version.