/** @packageDocumentation Picture type enumeration and {@link AsfPicture} class for embedded artwork in ASF files. */ import { ByteVector } from "../byteVector.js"; /** * Embedded picture type constants, compatible with the ID3v2 APIC frame * specification and used by ASF's `WM/Picture` attribute. */ export declare enum AsfPictureType { /** General picture not fitting any other category. */ Other = 0, /** Small square icon, typically 32×32 pixels, PNG only. */ FileIcon = 1, /** Another file icon (not necessarily square or PNG). */ OtherFileIcon = 2, /** Front cover artwork. */ FrontCover = 3, /** Back cover artwork. */ BackCover = 4, /** Leaflet/booklet page. */ LeafletPage = 5, /** Media label (e.g. CD). */ Media = 6, /** Lead/sole artist or performer. */ LeadArtist = 7, /** Artist or performer. */ Artist = 8, /** Conductor. */ Conductor = 9, /** Band or orchestra. */ Band = 10, /** Composer. */ Composer = 11, /** Lyricist or text writer. */ Lyricist = 12, /** Recording location. */ RecordingLocation = 13, /** Picture taken during recording. */ DuringRecording = 14, /** Picture taken during performance. */ DuringPerformance = 15, /** Movie/video screen capture. */ MovieScreenCapture = 16, /** A bright coloured fish (yes, really; part of the ID3v2 spec). */ ColouredFish = 17, /** Illustration related to the track. */ Illustration = 18, /** Artist/band logo. */ BandLogo = 19, /** Publisher/studio logo. */ PublisherLogo = 20 } /** * Convert an {@link AsfPictureType} to its human-readable name. * * @param type - The picture type constant. * @returns The display name, or `"Other"` for unrecognised values. */ export declare function pictureTypeToString(type: AsfPictureType): string; /** * Convert a human-readable picture type name to the corresponding * {@link AsfPictureType} constant (case-insensitive). * * @param str - The display name (e.g. `"Front Cover"`). * @returns The matching constant, or {@link AsfPictureType.Other} when not found. */ export declare function pictureTypeFromString(str: string): AsfPictureType; /** * Represents an embedded picture stored in an ASF `WM/Picture` attribute. * * Create instances via {@link AsfPicture.create} (valid picture) or * {@link AsfPicture.fromInvalid} (sentinel / placeholder). */ export declare class AsfPicture { /** Whether this picture object holds valid data. */ private _valid; /** Picture type (album art category). */ private _type; /** MIME type of the picture data (e.g. `"image/jpeg"`). */ private _mimeType; /** Optional description / caption. */ private _description; /** Raw encoded picture bytes. */ private _picture; /** * @param valid - Whether this instance holds valid picture data. */ private constructor(); /** Create a new valid empty picture. */ static create(): AsfPicture; /** Create an invalid (sentinel) picture. */ static fromInvalid(): AsfPicture; /** `true` if this object was successfully parsed or explicitly created. */ get isValid(): boolean; /** MIME type string (e.g. `"image/jpeg"`). */ get mimeType(): string; /** @param value - The new MIME type. */ set mimeType(value: string); /** Picture category/type. */ get type(): AsfPictureType; /** @param value - The new picture type. */ set type(value: AsfPictureType); /** Optional description or caption for the picture. */ get description(): string; /** @param value - The new description. */ set description(value: string); /** Raw encoded picture bytes (JPEG, PNG, etc.). */ get picture(): ByteVector; /** @param value - The new picture data. */ set picture(value: ByteVector); /** * Byte size of this picture when serialized inside an ASF attribute. * Accounts for the type byte, 4-byte size field, and null-terminated * UTF-16LE MIME type and description strings. */ get dataSize(): number; /** * Serialize this picture to bytes for storage in an ASF `WM/Picture` * attribute. Returns an empty `ByteVector` if this instance is invalid. */ render(): ByteVector; /** * Deserialize a `WM/Picture` payload into this instance. * * Sets {@link isValid} to `true` on success and `false` on malformed input. * * @param bytes - The raw bytes of the attribute value. */ parse(bytes: ByteVector): void; } //# sourceMappingURL=asfPicture.d.ts.map