import { Buffer } from 'node:buffer'; import type { Size } from '../types'; export interface ImageInfo extends Size { } /** * Reads PNG/JPEG dimensions from the encoded header without decoding pixels. * This is intended for validating already-decoded dimension hints before an * image transform; full image validation remains the decoder's responsibility. */ export declare function encodedImageInfoOfBuffer(imageBuffer: Buffer): ImageInfo; /** * Retrieves the dimensions of an image from a base64-encoded string * * @param imageBase64 - The base64-encoded image data * @returns A Promise that resolves to an object containing the width and height of the image * @throws Error if the image data is invalid */ export declare function imageInfoOfBase64(imageBase64: string): Promise; /** * Check if the Buffer is a valid PNG image * @param buffer The Buffer to check * @returns true if the Buffer is a valid PNG image, otherwise false */ export declare function isValidPNGImageBuffer(buffer: Buffer): boolean; /** * Check if the Buffer is a valid JPEG image * @param buffer The Buffer to check * @returns true if the Buffer is a valid JPEG image, otherwise false */ export declare function isValidJPEGImageBuffer(buffer: Buffer): boolean; /** * Check if the Buffer is a valid image (PNG or JPEG) * @param buffer The Buffer to check * @returns true if the Buffer is a valid PNG or JPEG image, otherwise false */ export declare function isValidImageBuffer(buffer: Buffer): boolean; export interface ValidateScreenshotBufferOptions { label: string; minBufferSize?: number; } export declare function validateScreenshotBuffer(screenshotBuffer: Buffer | undefined, { label, minBufferSize }: ValidateScreenshotBufferOptions): asserts screenshotBuffer is Buffer; //# sourceMappingURL=info.d.ts.map