I just got a ScanSnap iX1300, and I found the need to address a couple of little quirks about it.
First off, it doesn't add a counter number suffix to the very first scan in a sequence. This messes up order-by-name file listings in macOS. The fix I have is a simple little shell script, that's very brittle because it expects the exact yyyy-mm-dd-hh-mm-ss.jpg filename coming from the ScanSnap.
for i in $(ls | egrep -i '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9][0-9].jpg' ); do
mv "$i" "${i%.*}_000.jpg"
done
That scanner seems to have a huge quality and image file size jump between the "Better" and "Excellent" settings, going from 150 dots per inch to 600. I want something in between. Another little shell script batch resamples all *.jpg images in the current directory to 300 dots per inch.
for i in *.jpg; do
magick "$i" -resample 300x300 -quality 85 -monitor "${i%.*}_300dpi.jpg"
rm "$i"
done
Sometimes I've found the reported dots per inch gets messed up and differs between adjacent scanning sessions, so in some cases, I also pass in an explicit -resize argument in addition to -resample. For example, the shell script below works on letter-sized scans that I want to resample to 300 dots per inch.
for i in *.jpg; do
magick "$i" -resample 300x300 -resize 3300x3300 -quality 85 -monitor "${i%.*}_300dpi.jpg"
rm "$i"
done
Sometimes I also need to batch rotate the images. ImageMagick comes to the rescue again.
for i in *.jpg; do
magick "$i" -rotate 90 -monitor "${i%.*}_rotated.jpg"
rm "$i"
done