/** @packageDocumentation ID3v2 attached picture frame (APIC). Stores embedded album art and other images. */ import { ByteVector, StringType } from "../../../byteVector.js"; import { Id3v2Frame, Id3v2FrameHeader } from "../id3v2Frame.js"; /** Standard picture types as defined in the ID3v2 specification. */ export declare enum PictureType { Other = 0, FileIcon = 1, OtherFileIcon = 2, FrontCover = 3, BackCover = 4, LeafletPage = 5, Media = 6, LeadArtist = 7, Artist = 8, Conductor = 9, Band = 10, Composer = 11, Lyricist = 12, RecordingLocation = 13, DuringRecording = 14, DuringPerformance = 15, MovieScreenCapture = 16, ColouredFish = 17, Illustration = 18, BandLogo = 19, PublisherLogo = 20 } /** * Attached picture frame (APIC). * * Structure: encoding(1) + mimeType(null-terminated Latin1) + pictureType(1) * + description(null-terminated in encoding) + pictureData. */ export declare class AttachedPictureFrame extends Id3v2Frame { /** Text encoding used for the description field. Defaults to UTF-8 to correctly handle all Unicode. */ private _encoding; /** MIME type of the embedded image (e.g. `"image/jpeg"`). */ private _mimeType; /** Semantic role of the picture within the tag. */ private _pictureType; /** Short description of the picture. */ private _description; /** Raw binary image data. */ private _picture; /** * Creates a new, empty AttachedPictureFrame. * @param encoding - Text encoding to use for the description field. * Defaults to `StringType.UTF8` so all Unicode characters are stored correctly. */ constructor(encoding?: StringType); /** Gets the text encoding used for the description field. */ get encoding(): StringType; /** Sets the text encoding used for the description field. */ set encoding(e: StringType); /** Gets the MIME type of the embedded image (e.g. `"image/jpeg"`). */ get mimeType(): string; /** Sets the MIME type of the embedded image. */ set mimeType(value: string); /** Gets the semantic picture type. */ get pictureType(): PictureType; /** Sets the semantic picture type. */ set pictureType(value: PictureType); /** Gets the short description of the picture. */ get description(): string; /** Sets the short description of the picture. */ set description(value: string); /** Gets the raw binary image data. */ get picture(): ByteVector; /** Sets the raw binary image data. */ set picture(data: ByteVector); /** * Returns a human-readable string combining the MIME type and description. * @returns A string in the form `"[mimeType] description"`. */ toString(): string; /** @internal Create from raw frame data. */ static fromData(data: ByteVector, header: Id3v2FrameHeader, version: number): AttachedPictureFrame; /** * Parses the raw APIC frame field data, populating all picture properties. * @param data - Decoded frame field bytes (after unsynchronisation/decompression). * @param version - ID3v2 version number (2 for v2.2, 3 for v2.3, 4 for v2.4). */ protected parseFields(data: ByteVector, version: number): void; /** * Renders the frame field data to bytes. * @param version - ID3v2 version number used to determine the on-disk format. * @returns A `ByteVector` containing the encoded APIC field data. */ protected renderFields(version: number): ByteVector; } //# sourceMappingURL=attachedPictureFrame.d.ts.map