/** * Minimal PNG decoder — zero external dependencies (only node's built-in * `zlib.inflateSync`). We need it so the pattern-graph can read a drawn image * (a histogram, a curve, a filled band) and turn it into a signal/corridor. * * Supports what real image exports actually produce: 8-bit (and 16-bit, * high-byte) grayscale/RGB/gray+alpha/RGBA, 8-bit palette (with tRNS alpha), * non-interlaced. Sub-byte depths and Adam7 interlace throw a clear "re-export" * error rather than decoding wrong. Output is a flat RGBA byte grid. */ export interface DecodedImage { readonly width: number; readonly height: number; /** Row-major RGBA, 4 bytes per pixel: `rgba[(y*width + x)*4 + c]`. */ readonly rgba: Uint8Array; } /** Decode a PNG buffer into an RGBA grid. Throws on anything it can't read exactly. */ export declare function decodePng(buf: Uint8Array): DecodedImage; /** Perceptual luminance 0..255 of an RGB triple (Rec. 601). */ export declare function luminance(r: number, g: number, b: number): number; /** Whether the PNG signature is present — lets callers branch PNG vs SVG on `src`. */ export declare function isPng(buf: Uint8Array): boolean; //# sourceMappingURL=png.d.ts.map