/** * Calculates the dimensions of each pass for a given image size * @param width - The width of the image * @param height - The height of the image * @returns Array of pass dimensions, including width, height, and pass index */ export declare function getImagePasses(width: number, height: number): PassDimensions[]; /** * Creates an iterator function for interlaced pixel access * @param width - The width of the image * @returns A function that calculates the buffer index for a given x, y coordinate and pass */ export declare function getInterlaceIterator(width: number): InterlaceIterator; /** * The seven passes of the Adam7 interlacing algorithm. * Each pass specifies which x and y coordinates it handles in an 8x8 block. */ export declare const imagePasses: readonly InterlacePass[]; /** * Implementation of the Adam7 interlacing algorithm for PNG images. * The Adam7 algorithm splits the image into 7 passes, each covering different pixels * in an 8x8 pattern. The pattern for each pass is shown below: * * 0 1 2 3 4 5 6 7 * 0 1 6 4 6 2 6 4 6 // Numbers indicate the pass (1-7) that handles each pixel * 1 7 7 7 7 7 7 7 7 * 2 5 6 5 6 5 6 5 6 * 3 7 7 7 7 7 7 7 7 * 4 3 6 4 6 3 6 4 6 * 5 7 7 7 7 7 7 7 7 * 6 5 6 5 6 5 6 5 6 * 7 7 7 7 7 7 7 7 7 */ declare interface InterlacePass { readonly x: readonly number[] readonly y: readonly number[] } declare interface PassDimensions { width: number height: number index: number } declare type InterlaceIterator = (_x: number, _y: number, _pass: number) => number;