next scanning administrative documents, mostly black and white documents I receive via…
- User
next scanning administrative documents, mostly black and white documents I receive via postal mail, I try to process the scans with gimp to maximise their levels, so white is white and black black. gimp menu: Colors > Levels... seeting levels then ok
the operation takes time and I would like finding a way to do autonatically via the cli
Assistant
For automating document level adjustment via command line, you can use ImageMagick instead of GIMP. It's perfect for batch processing scans with a simple command:
bashconvert input.jpg -level 0%,100%,1.0 output.jpgFor multiple files in a folder:
bashfor file in *.jpg; do convert "$file" -level 0%,100%,1.0 "processed_$file" doneIf you want more control similar to GIMP's levels dialog, you can adjust the parameters:
bash
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.