CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-sharp

High performance Node.js image processing library for resizing JPEG, PNG, WebP, GIF, AVIF and TIFF images

80

1.01x
Overview
Eval results
Files

rubric.jsonevals/scenario-5/

{
  "context": "This evaluation assesses how effectively the engineer uses the sharp library's compositing capabilities, specifically blend modes and positioning features, to build a watermark application. The focus is on proper usage of sharp's composite() method with blend modes and gravity-based positioning.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses sharp composite",
      "description": "Uses sharp's composite() method to overlay watermark images onto the base image",
      "max_score": 20
    },
    {
      "name": "Implements blend modes",
      "description": "Correctly specifies blend mode parameter in composite operations (e.g., 'over', 'multiply', 'screen') using the blend property",
      "max_score": 25
    },
    {
      "name": "Implements gravity positioning",
      "description": "Uses the gravity property in composite input objects to position watermarks (e.g., 'northwest', 'southeast', 'center')",
      "max_score": 20
    },
    {
      "name": "Multiple composite layers",
      "description": "Correctly handles multiple watermark overlays by passing an array of input objects to composite() or chaining composite calls",
      "max_score": 20
    },
    {
      "name": "Proper image loading",
      "description": "Uses sharp() constructor to load base images from Buffer or file path inputs",
      "max_score": 10
    },
    {
      "name": "Output as Buffer",
      "description": "Uses toBuffer() or similar method to return the final composited image as a Buffer",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-sharp

tile.json