/** * Read an image's intrinsic dimensions from its file **header**, in pure JS - no decode, no codec, no * dependency. Supports PNG, JPEG, GIF, and WebP (VP8/VP8L/VP8X). Used to give `` CLS-safe * `width`/`height` (build-time tooling can pre-read them into a manifest). */ export type ImageFormat = "png" | "jpeg" | "gif" | "webp"; export interface ImageInfo { readonly width: number; readonly height: number; readonly format: ImageFormat; } /** Parse intrinsic dimensions + format from image header bytes, or `null` if unrecognized/too short. */ export declare function imageDimensions(bytes: Uint8Array): ImageInfo | null; /** * Read just the leading bytes of an image file (via the platform `Bun.file`/`fetch` blob) and parse its * dimensions. Build-time tooling: pre-read dimensions into a manifest so `` is CLS-safe without * hardcoding sizes. Reads at most `maxBytes` (default 64 KB - enough for any header). */ export declare function readImageDimensions(source: { arrayBuffer(): Promise; stream?: () => ReadableStream; }, maxBytes?: number): Promise; //# sourceMappingURL=dimensions.d.ts.map