import type { RawImage } from './types.js'; /** * A horizontal slice of a source image. `data` holds `height` image rows * starting at `yOffset`; `sourceHeight` is the full image's height, because * reduce-v1's row mapping is defined on the *global* grid — a band that * re-derived it from its own height would land on different source rows and * stop agreeing with a whole-frame reduction. */ export interface SourceStrip { width: number; height: number; sourceHeight: number; yOffset: number; data: Uint8Array | Uint8ClampedArray; } /** Image rows a cell-row band reads, per reduce-v1's mapping. */ export declare function bandSourceRows(sourceHeight: number, rows: number, rowStart: number, rowEnd: number): { y0: number; y1: number; }; /** * reduce-v1 (ALGORITHM.md §4): integer box filter to exactly (8·columns) × (8·rows) * RGBA samples, alpha-weighted. `ignoreAlpha` treats every pixel as a = 255. */ export declare function reduceSource(source: RawImage, columns: number, rows: number, ignoreAlpha: boolean): Uint8Array; /** * reduce-v1 over cell rows [rowStart, rowEnd) only, reading a strip that must * cover `bandSourceRows`. Output is band-local: (8·columns) × (8·(rowEnd−rowStart)). * Every sample is byte-identical to the same region of a whole-frame reduction — * the row mapping below is computed from the global `ty`, never from the band. */ export declare function reduceBand(strip: SourceStrip, columns: number, rows: number, ignoreAlpha: boolean, rowStart: number, rowEnd: number): Uint8Array;