import { Buffer } from "node:buffer"; import { BufferInput } from "../input/index.js"; /** * Generic class for image extraction. */ export declare class ExtractedImage { /** * Raw file bytes for the extracted image artifact. */ buffer: Buffer; /** * Filename used when exporting the extracted image. */ filename: string; /** * 1-based source page identifier. */ readonly pageId: number; /** * Identifier of the extracted element on the page. */ readonly elementId: number; constructor(buffer: Uint8Array, fileName: string, pageId: number, elementId: number); /** * Saves the document to a file. * * @param outputPath Path to save the file to. */ saveToFileAsync(outputPath: string): Promise; /** * Attempts to save the document to a file synchronously. * Throws an error if the file extension is not supported or if the file could not be saved to disk for some reason. * * @param outputPath Path to save the file to. */ saveToFile(outputPath: string): void; /** * Return the file as a Mindee-compatible BufferInput source. * * @returns A BufferInput source. */ asInputSource(): BufferInput; }