Test cases / image

deft image convert

Change format: --to png|jpg|webp|avif|gif|tiff|bmp|ico

6 runs on real files, 24 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.

Convert a print-ready CMYK JPEGPassed

cmyk.jpg is CMYK and looks wrong on the web. Save it as rgb.png in normal RGB colors.

deft image convert cmyk.jpg --to png -o rgb.png

Input

cmyk.jpg 28.7 KB · 100x100
cmyk.jpg

Output

rgb.png 4.1 KB · 100x100
rgb.png
Automatic checks (2)
  • image: file = "rgb.png", format = "PNG", width = 100
  • image_similar: file = "rgb.png", to = "cmyk.jpg", max_difference = 30

Bake in EXIF orientationPassed

landscape_6.jpg shows sideways in some apps. Save upright.jpg with the pixels actually rotated and no rotation flag.

deft image convert landscape_6.jpg --to jpg -o upright.jpg

Input

landscape_6.jpg 134.4 KB · 450x600
landscape_6.jpg

Output

upright.jpg 108.2 KB · 600x450
upright.jpg
Automatic checks (1)
  • image: file = "upright.jpg", width = 600, height = 450, orientation = 1

First frame of a GIFPassed

Save the first frame of earth.gif as frame.png.

deft image convert earth.gif --to png -o frame.png

Input

earth.gif 978.2 KB · 400x400
earth.gif

Output

frame.png 61.3 KB · 400x400
frame.png
Automatic checks (1)
  • image: file = "frame.png", format = "PNG", width = 400

Convert an iPhone photoPassed

Convert photo.heic to photo.jpg.

deft image convert photo.heic --to jpg -o photo.jpg

Input

photo.heic 704.2 KB
photo.heic

Output

photo.jpg 991.8 KB · 3024x4032
photo.jpg
Automatic checks (1)
  • image: file = "photo.jpg", format = "JPEG", width = 3024, height = 4032

Flatten transparencyPassed

Convert dice.png to dice.jpg with a white background where it is transparent.

deft image convert dice.png -o dice.jpg

Input

dice.png 219.3 KB · 800x600
dice.png

Output

dice.jpg 41.6 KB · 800x600
dice.jpg
Automatic checks (2)
  • image: file = "dice.jpg", format = "JPEG", width = 800, has_alpha = false
  • script: run = "corner_is_white.py"

Decode WebPPassed

Convert gallery.webp to gallery.png.

deft image convert gallery.webp --to png -o gallery.png

Input

gallery.webp 29.6 KB · 550x368
gallery.webp

Output

gallery.png 279.7 KB · 550x368
gallery.png
Automatic checks (1)
  • image: file = "gallery.png", format = "PNG", width = 550