High performance Node.js image processing library for resizing JPEG, PNG, WebP, GIF, AVIF and TIFF images
80
Build a tool that converts images to JPEG 2000 format for long-term archival storage with configurable quality and lossless options.
The tool should accept input images in common formats and convert them to JPEG 2000 (JP2) format. It must support:
The converter should handle both single image conversion and batch processing.
@generates
/**
* Converts an image to JPEG 2000 format
*
* @param {string|Buffer} input - Path to input image or image buffer
* @param {object} options - Conversion options
* @param {number} [options.quality] - Quality level (1-100) for lossy compression
* @param {boolean} [options.lossless] - Use lossless compression (default: false)
* @param {boolean} [options.tileOutput] - Enable tiled encoding (default: false)
* @returns {Promise<Buffer>} - JP2 encoded image buffer
*/
async function convertToJP2(input, options) {
// Implementation
}
module.exports = { convertToJP2 };Provides image processing and JP2 encoding capabilities.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-sharpdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10