/** * Semantic, AEO-oriented metadata shape. * * This is deliberately NOT a raw EXIF/XMP tag map. It models the fields that * answer engines and search crawlers actually read about an image, and the * library maps them onto the correct XMP namespaces (dc:, photoshop:, * Iptc4xmpCore:, Iptc4xmpExt:, xmpRights:) under the hood. */ export interface ImageMetadata { /** Human/AI-readable caption: "what is this image". Maps to dc:description (x-default). */ description?: string; /** Short title. Maps to dc:title (x-default). */ title?: string; /** Keyword/tag list. Maps to dc:subject (rdf:Bag). */ keywords?: string[]; /** Author/creator. Maps to dc:creator (rdf:Seq). */ creator?: string; /** Copyright / rights statement. Maps to dc:rights (x-default). */ rights?: string; /** Accessibility alt text — the field Google reads. Maps to Iptc4xmpCore:AltTextAccessibility. */ altText?: string; /** Credit line. Maps to photoshop:Credit. */ credit?: string; /** * URL to the license / usage-terms page. Maps to xmpRights:WebStatement. * One of the two fields Google Images reads for the "Licensable" badge. */ licenseUrl?: string; /** * Where to acquire a license (+ optional licensor name). Maps to the IPTC * PLUS plus:Licensor structure (plus:LicensorURL / plus:LicensorName). * Powers the "Get this image on…" link in Google Images. */ licensor?: { url: string; name?: string; }; /** Explicit copyright notice, distinct from `rights`. Maps to photoshop:Copyright. */ copyrightNotice?: string; /** * How the image came to be — an IRI from the IPTC Digital Source Type * vocabulary (https://cv.iptc.org/newscodes/digitalsourcetype/). Maps to * Iptc4xmpExt:DigitalSourceType. This is the field ecosystems key off to * label an image as AI-generated: set it to * `DIGITAL_SOURCE_TYPE.trainedAlgorithmicMedia` alongside the `ai` fields. */ digitalSourceType?: string; /** * AI-generation provenance (IPTC Photo Metadata Standard 2025.1, Extension * schema). Per IPTC guidance, also set `digitalSourceType` and leave * `creator` empty for fully AI-generated images — the prompt writer is * explicitly not the image creator. */ ai?: { /** * Prompt(s) given to the generative AI service, including negative * prompts and model parameters if you wish. Maps to * Iptc4xmpExt:AIPromptInformation. */ prompt?: string; /** Name of the person who wrote the prompt. Maps to Iptc4xmpExt:AIPromptWriterName. */ promptWriter?: string; /** * The AI engine and/or model used, e.g. "DALL-E via Bing Image Creator". * Maps to Iptc4xmpExt:AISystemUsed. */ system?: string; /** Version of the AI system, if known. Maps to Iptc4xmpExt:AISystemVersionUsed. */ systemVersion?: string; }; } /** * Common IRIs from the IPTC "Digital Source Type" NewsCodes vocabulary, for * use as `ImageMetadata.digitalSourceType`. Not exhaustive — any IRI from * https://cv.iptc.org/newscodes/digitalsourcetype/ is valid. */ export declare const DIGITAL_SOURCE_TYPE: { /** Generated purely by an AI model from prompts — the standard "AI-generated" disclosure. */ readonly trainedAlgorithmicMedia: "http://cv.iptc.org/newscodes/digitalsourcetype/trainedAlgorithmicMedia"; /** Composite that includes AI-generated elements. */ readonly compositeWithTrainedAlgorithmicMedia: "http://cv.iptc.org/newscodes/digitalsourcetype/compositeWithTrainedAlgorithmicMedia"; /** Composite of captured and synthetic elements. */ readonly compositeSynthetic: "http://cv.iptc.org/newscodes/digitalsourcetype/compositeSynthetic"; /** Original photograph from a digital camera. */ readonly digitalCapture: "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture"; }; export type ImageFormat = "webp" | "jpeg" | "png" | "avif" | "heic" | "unknown"; export declare class UnsupportedFormatError extends Error { readonly format: ImageFormat; constructor(format: ImageFormat, operation: string); }