/** * Just enough PNG to know how big an image is. * * Hand-written rather than pulled from an image library, and the distinction is * the one the repository's conventions draw: decoding a PNG is somebody else's * solved problem, and reading the eight bytes of its header is not decoding. The * alternative here is `sharp`, which is libvips — a native binary, a peer * dependency and a hundred megabytes — to answer a question the file states in * its first twenty-four bytes. * * It refuses anything that is not a PNG rather than guessing, because that * refusal is itself one of the rules (`pngOnly`). */ export interface PngSize { width: number; height: number; } /** * The dimensions of a PNG, or `null` if the bytes are not one. * * `null` rather than a throw: the caller is validating a whole pass and wants * every problem at once, not the first one. */ export declare function readPngSize(bytes: Uint8Array): PngSize | null; //# sourceMappingURL=png.d.ts.map