Test cases / image

deft image resize

Scale: --size 800x, 1920x1080, 50%

3 runs on real files, 21 tests on generated files, not shown. 0 failed.

Real-file tasks

Real files and a plain-language job, from the agent benchmark. These are the reference answers, not an agent run.

Resize a large photoPassed

Make a 1200 pixel wide version of earth.jpg called web.jpg.

deft image resize earth.jpg --size 1200x -o web.jpg

Input

earth.jpg 6.2 MB · 3000x3002
earth.jpg

Output

web.jpg 337.2 KB · 1200x1201
web.jpg
Automatic checks (1)
  • image: file = "web.jpg", width = 1200, format = "JPEG"

Rasterise an SVGPassed

Export tiger.svg as a 1024 pixel wide PNG called tiger.png.

deft image resize tiger.svg --size 1024x --upscale -o tiger.png

The files are not kept here, because tiger.svg is under AGPL. Its source is linked.

Input

No input file.

Output

No output file. The result is what it printed.

Automatic checks (1)
  • image: file = "tiger.png", width = 1024, format = "PNG"

Thumbnails for a mixed folderPassed

Create 200 pixel wide thumbnails of every image in the photos folder, in a folder called thumbs.

deft image resize photos/ --size 200x -o thumbs/

Input

photos/camera.jpg 157.9 KB · 640x480
photos/camera.jpg
photos/earth.jpg 6.2 MB · 3000x3002
photos/earth.jpg
photos/sideways.jpg 134.4 KB · 450x600
photos/sideways.jpg

Output

thumbs/camera.jpg 16.5 KB · 200x150
thumbs/camera.jpg
thumbs/earth.jpg 16.9 KB · 200x200
thumbs/earth.jpg
thumbs/sideways.jpg 15.9 KB · 200x150
thumbs/sideways.jpg
Automatic checks (2)
  • count_files: glob = "thumbs/*", count = 3
  • each: glob = "thumbs/*", check = {"type": "image", "width": 200}