High performance Node.js image processing library for resizing JPEG, PNG, WebP, GIF, AVIF and TIFF images
80
Build a utility that combines separate grayscale channel images into a single multi-channel RGB or RGBA image.
Your solution should:
@generates
/**
* Combines separate grayscale channel images into a multi-channel image.
*
* @param {Object} options - Configuration options
* @param {string} options.redPath - Path to the red channel image
* @param {string} options.greenPath - Path to the green channel image
* @param {string} options.bluePath - Path to the blue channel image
* @param {string} [options.alphaPath] - Optional path to the alpha channel image
* @param {string} options.outputPath - Path for the output combined image
* @returns {Promise<void>}
* @throws {Error} If input images have mismatched dimensions
*/
async function combineChannels(options) {
// IMPLEMENTATION HERE
}
module.exports = { combineChannels };Provides image processing capabilities including channel manipulation.
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