UNPKG

jp2-to-image

Version:

A library for converting JPEG 2000 (JP2) images to another format

20 lines (19 loc) 671 B
export declare class JPEG2000NodeConverter { private binPath; constructor(); /** * Handles the conversion process * @param inputBuffer The input image buffer * @param format Target format * @returns Converted image as a buffer */ convertImage(inputBuffer: Buffer, format?: string): Promise<Buffer>; /** * Executes the conversion binary, sending the image via stdin and receiving the result via stdout. * * @param inputBuffer The input image as a Buffer * @param format The desired output format (e.g., "jpg", "png", "jp2") * @returns The converted image as a Buffer */ private _executeJar; }