import type { ProbedImageSize } from './types.js';
/**
 * Image dimension probe used as a fallback when `sharp` is not configured.
 * Reads only the header bytes needed to determine width and height.
 *
 * PNG, JPEG, GIF, WebP, AVIF and HEIF/HEIC are delegated to `image-dimensions`
 * (actively maintained, zero dependencies). BMP, ICO/CUR, SVG, TIFF and JPEG
 * XL have no such maintained equivalent, so they're read here directly; each
 * of those parsers advances by a fixed amount or is bounded by an explicit
 * guard, so malformed input can never block the event loop.
 *
 * Replaces the archived `image-size` package, whose ICNS/HEIF parsers shipped
 * unpatched denial-of-service vulnerabilities (CVE-2025-71330, CVE-2025-71319).
 *
 * Two edge cases changed behavior compared to the previous hand-rolled parser:
 * - JPEG files using arithmetic coding or hierarchical encoding (SOF markers
 *   5-7, 9-11, 13-15) are no longer read; `image-dimensions` only recognizes
 *   baseline and progressive JPEG (SOF0-3). These encodings are not produced
 *   by browsers or cameras, so this is not expected to affect real uploads.
 * - AVIF/HEIF detection now checks the container's brand list instead of
 *   accepting any ISO base media file with a `ftyp` box, so non-image formats
 *   that share the same container (for example MP4/MOV) are correctly no
 *   longer misidentified as images.
 *
 * @throws if the buffer is not a recognized/parseable image format
 */
export declare function probeImageSize(data: Buffer): ProbedImageSize;
/**
 * Probe used when the file lives on disk via `tempFilePath`. PNG, JPEG, GIF,
 * WebP, AVIF and HEIF/HEIC are read through `imageDimensionsFromStream`,
 * which reads only as many bytes as are needed to find the header, so a
 * large file's data is never pulled into memory. BMP, ICO/CUR, SVG, TIFF and
 * JPEG XL are detected from a small header sniff and, only then, read in
 * full for `probeImageSize` to parse.
 *
 * @throws if the file is not a recognized/parseable image format
 */
export declare function probeImageSizeFromPath(tempFilePath: string): Promise<ProbedImageSize>;
//# sourceMappingURL=probeImageSize.d.ts.map