import { type ImageMetadata, type ImageFormat, UnsupportedFormatError, DIGITAL_SOURCE_TYPE } from "./types.ts"; import { serializeXmp } from "./xmp/serialize.ts"; import { parseXmp } from "./xmp/parse.ts"; export type { ImageMetadata, ImageFormat }; export { UnsupportedFormatError, DIGITAL_SOURCE_TYPE }; export { serializeXmp, parseXmp }; /** Detect the container format from magic bytes. */ export declare function detectFormat(buf: Uint8Array): ImageFormat; /** * Read semantic metadata from an image buffer. * v1 reads WebP XMP; other formats throw a clear UnsupportedFormatError. */ export declare function readMetadata(buf: Uint8Array): ImageMetadata; /** * Write semantic metadata into an image buffer, preserving pixels byte-for-byte. * Returns a new buffer; the input is never mutated. * v1 writes WebP XMP; other formats throw a clear UnsupportedFormatError. */ export declare function writeMetadata(buf: Uint8Array, meta: ImageMetadata): Uint8Array; /** * Remove XMP/EXIF metadata from an image, preserving pixels and ICC profile. * Returns a new buffer; the input is never mutated. * v1 supports WebP; other formats throw a clear UnsupportedFormatError. */ export declare function removeMetadata(buf: Uint8Array): Uint8Array;