pub fn step_prep_image(bytes: &[u8]) -> Result<StepVisionUnit, Box<dyn Error>>Expand description
Decode + preprocess one image: bytes -> main view + crop tiles per the vendor pipeline. Admission runs FIRST (header-only); the decoder is capped to the admitted dimensions. The returned unit’s tile count MUST match the header plan — the caller refuses on drift (pad runs are already rendered from the plan).