def raster.reduce
import gralha-svg-render@0.1.0.1/svg.bend as Svgimport Base
4311# Reduce a whole image to rw by rh pixels; the caller rescales the brush inverse to match.
4312def raster.reduce(+r: Raster, +rw: U32, +rh: U32) -> Raster:
4313 Raster{origin, step, width, height, depth, linear, pixels} = r
4314 raster.resample(r, rw, rh, (U32.to_f32(width) / U32.to_f32(rw) : F32), (U32.to_f32(height) / U32.to_f32(rh) : F32))