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-1/

{
  "context": "This criteria evaluates how effectively the engineer uses the Sharp library's JPEG 2000 (JP2) output functionality, focusing on proper usage of JP2 format options including quality settings, lossless compression, and tiled encoding.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Sharp instance creation",
      "description": "Creates a Sharp instance using sharp() constructor to load the input image (from file path or Buffer)",
      "max_score": 15
    },
    {
      "name": "JP2 format selection",
      "description": "Uses the .jp2() method or .toFormat('jp2') to specify JPEG 2000 output format",
      "max_score": 20
    },
    {
      "name": "Quality parameter",
      "description": "Passes the quality option to .jp2() method (e.g., .jp2({ quality: 80 })) to control lossy compression level",
      "max_score": 20
    },
    {
      "name": "Lossless option",
      "description": "Uses the lossless option in .jp2() method (e.g., .jp2({ lossless: true })) to enable lossless compression",
      "max_score": 20
    },
    {
      "name": "Tiled encoding option",
      "description": "Uses the tile option in .jp2() method (e.g., .jp2({ tile: true })) or similar tiling parameter to enable tiled output",
      "max_score": 15
    },
    {
      "name": "Output generation",
      "description": "Uses .toBuffer() or similar output method to generate the JP2 encoded image buffer and returns it",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-sharp

tile.json