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

{
  "context": "This criteria evaluates how well the engineer uses the sharp package's rotation capabilities to implement auto-orientation, 90-degree rotations, arbitrary angle rotations, and combined rotation operations.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses rotate() method",
      "description": "Uses sharp's rotate() method for implementing rotation functionality. The rotate() method can handle both arbitrary angles and auto-rotation when called without arguments.",
      "max_score": 25
    },
    {
      "name": "Auto-orient with rotate()",
      "description": "Implements auto-orientation using rotate() without arguments, which automatically applies EXIF orientation. Should not manually parse or apply EXIF orientation tags.",
      "max_score": 20
    },
    {
      "name": "90-degree rotation",
      "description": "Implements 90-degree rotations by calling rotate() with angles that are multiples of 90 (e.g., rotate(90), rotate(180), rotate(270)). Should calculate the angle as 90 * times.",
      "max_score": 15
    },
    {
      "name": "Arbitrary angle rotation",
      "description": "Implements arbitrary angle rotation by passing the degrees parameter directly to rotate(). Should handle both positive (clockwise) and negative (counter-clockwise) angles.",
      "max_score": 15
    },
    {
      "name": "Background color handling",
      "description": "Configures background color for arbitrary angle rotations using the background option in rotate(). Should set black background ({ background: { r: 0, g: 0, b: 0, alpha: 1 } } or { background: '#000000' }) for non-90-degree rotations.",
      "max_score": 10
    },
    {
      "name": "Method chaining",
      "description": "Properly chains sharp methods together, especially for autoOrientAndRotate which should chain rotate() without arguments followed by rotate(degrees) in a single pipeline.",
      "max_score": 10
    },
    {
      "name": "File I/O operations",
      "description": "Uses sharp constructor with file path or buffer for input and toFile() method for output. Should properly handle the async nature of these operations.",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-sharp

tile.json