Files
tools/image-scale-cli/openspec/changes/archive/2026-04-11-scale-image-fixer/tasks.md
T

1.4 KiB

1. Project Setup

  • 1.1 Initialize Deno project with deno.json configuration
  • 1.2 Set up directory structure (src/, cli.ts)
  • 1.3 Add image processing dependency compatible with Deno

2. Core Image Scaling Implementation

  • 2.1 Create image loader module supporting PNG, JPEG, WebP, GIF
  • 2.2 Implement scale function with exact dimensions (stretch) mode
  • 2.3 Implement scale function with fit mode (preserve aspect ratio)
  • 2.4 Implement scale function with cover mode (preserve aspect ratio, crop)
  • 2.5 Create image saver module with format detection

3. Batch Processing

  • 3.1 Implement directory scanner for supported image formats
  • 3.2 Create batch processor with progress reporting
  • 3.3 Add error handling for failed images in batch

4. CLI Interface

  • 4.1 Create CLI argument parser (input, output, width, height, mode)
  • 4.2 Implement single image scaling command
  • 4.3 Implement batch scaling command (directory/multiple files)
  • 4.4 Add error messages and exit codes for invalid input
  • 4.5 Add help documentation (--help flag)

5. Testing & Validation

  • 5.1 Create test images for each supported format
  • 5.2 Write unit tests for scale functions
  • 5.3 Write integration tests for CLI commands
  • 5.4 Test batch processing with mixed formats
  • 5.5 Verify output dimensions match specifications