Test cases / image

deft image trim

Cut away plain borders; --speck 4 ignores stray dots

1 run on real files, 5 tests on generated files, not shown. 0 failed.

Fixed cases

Generated files, compared with ground truth by tools other than deft.

the white margins of a real pagePassed

deft pdf to-images paper.pdf --pages 1 -o first.png
deft image trim first.png -o out.png

Input

paper.pdf 992.5 KB · 14 pages
Page 1Page 2Page 3

Output

first.png 472.7 KB · 1275x1650
first.png
out.png 457.6 KB · 1048x1346
out.png
What it printed
ok pdf.to-images paper.pdf -> first.png  1 image  0.42s
ok image.trim first.png -> out.png  1048x1346  0.24s
Automatic checks (1)
  • smaller: file = "out.png", than = "first.png"