High performance Node.js image processing library for resizing JPEG, PNG, WebP, GIF, AVIF and TIFF images
80
{
"context": "This evaluation assesses the engineer's ability to use Sharp's channel manipulation capabilities, specifically the joinChannel() method, to combine separate grayscale images into a multi-channel RGB or RGBA image. The focus is on proper usage of Sharp's API for channel operations.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses joinChannel method",
"description": "Solution uses Sharp's joinChannel() method to combine separate channel images into a multi-channel image",
"max_score": 40
},
{
"name": "Proper channel loading",
"description": "Correctly loads each separate channel image (red, green, blue, and optionally alpha) using Sharp instances before joining",
"max_score": 20
},
{
"name": "Dimension validation",
"description": "Uses Sharp's metadata() method to extract and validate that all input images have matching dimensions before combining",
"max_score": 15
},
{
"name": "Handles optional alpha",
"description": "Correctly handles the optional alpha channel case, joining 3 channels for RGB or 4 channels for RGBA based on input",
"max_score": 15
},
{
"name": "Output formatting",
"description": "Uses appropriate Sharp output methods (toFile(), toBuffer(), etc.) to save the combined multi-channel image",
"max_score": 10
}
]
}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