import type { AudioFileInput, Picture, PictureType } from "../types.js"; /** * Reads all embedded pictures from an audio file. * * @param file - File path, Uint8Array, ArrayBuffer, or File object * @returns Array of all pictures embedded in the file * @throws {TagLibInitializationError} If the Wasm module fails to initialize * @throws {InvalidFormatError} If the file is corrupted or in an unsupported format */ export declare function readPictures(file: AudioFileInput): Promise; /** * Replaces all embedded pictures in an audio file and returns the modified content as a buffer. * * @param file - File path, Uint8Array, ArrayBuffer, or File object * @param pictures - Complete set of pictures to embed; replaces any existing pictures * @returns Modified audio file contents with the updated picture set * @throws {TagLibInitializationError} If the Wasm module fails to initialize * @throws {InvalidFormatError} If the file is corrupted or in an unsupported format * @throws {FileOperationError} If saving the modified picture data fails */ export declare function applyPictures(file: AudioFileInput, pictures: Picture[]): Promise; /** * Appends a single picture to an audio file's existing embedded pictures. * * @param file - File path, Uint8Array, ArrayBuffer, or File object * @param picture - Picture to append to the file * @returns Modified audio file contents with the new picture added * @throws {TagLibInitializationError} If the Wasm module fails to initialize * @throws {InvalidFormatError} If the file is corrupted or in an unsupported format * @throws {FileOperationError} If saving the modified picture data fails */ export declare function addPicture(file: AudioFileInput, picture: Picture): Promise; /** * Removes all embedded pictures from an audio file and returns the modified content as a buffer. * * @param file - File path, Uint8Array, ArrayBuffer, or File object * @returns Modified audio file contents with all pictures removed * @throws {TagLibInitializationError} If the Wasm module fails to initialize * @throws {InvalidFormatError} If the file is corrupted or in an unsupported format * @throws {FileOperationError} If saving the modified file fails */ export declare function clearPictures(file: AudioFileInput): Promise; /** * Reads the front cover art from an audio file, falling back to the first embedded picture. * * @param file - File path, Uint8Array, ArrayBuffer, or File object * @returns Raw image bytes for the cover art, or `undefined` if no pictures are embedded * @throws {TagLibInitializationError} If the Wasm module fails to initialize * @throws {InvalidFormatError} If the file is corrupted or in an unsupported format */ export declare function readCoverArt(file: AudioFileInput): Promise; /** * Replaces all embedded pictures with a single front cover image and returns the modified content as a buffer. * * @param file - File path, Uint8Array, ArrayBuffer, or File object * @param imageData - Raw image bytes to embed as the front cover * @param mimeType - MIME type of the image (e.g., `"image/jpeg"`, `"image/png"`) * @returns Modified audio file contents with the new cover art * @throws {TagLibInitializationError} If the Wasm module fails to initialize * @throws {InvalidFormatError} If the file is corrupted or in an unsupported format * @throws {FileOperationError} If saving the modified picture data fails */ export declare function applyCoverArt(file: AudioFileInput, imageData: Uint8Array, mimeType: string): Promise; /** * Finds the first picture of a given type from an array of pictures. * * @param pictures - Array of pictures to search * @param type - Picture type to find (e.g., `"FrontCover"`, `"BackCover"`) * @returns The first matching picture, or `undefined` if none is found */ export declare function findPictureByType(pictures: Picture[], type: PictureType): Picture | undefined; /** * Replaces all pictures of a given type with a new picture and returns the modified content as a buffer. * * @param file - File path, Uint8Array, ArrayBuffer, or File object * @param newPicture - Replacement picture; its `type` determines which existing pictures are removed * @returns Modified audio file contents with the updated picture * @throws {TagLibInitializationError} If the Wasm module fails to initialize * @throws {InvalidFormatError} If the file is corrupted or in an unsupported format * @throws {FileOperationError} If saving the modified picture data fails */ export declare function replacePictureByType(file: AudioFileInput, newPicture: Picture): Promise; /** * Reads picture metadata (type, MIME type, description, and size) without returning raw image data. * * @param file - File path, Uint8Array, ArrayBuffer, or File object * @returns Array of metadata objects for each embedded picture; `size` is the byte length of the image data * @throws {TagLibInitializationError} If the Wasm module fails to initialize * @throws {InvalidFormatError} If the file is corrupted or in an unsupported format */ export declare function readPictureMetadata(file: AudioFileInput): Promise>; //# sourceMappingURL=picture-operations.d.ts.map