I’ve recently bought a Fujitsu ScanSnap S300 to help me scan in hundreds of old photos before they get lost or accidentally destroyed (not that jpegs are any less difficult to destroy, but at least they can be copied and backed up more easily).
When I received it I was a little annoyed that it was not Linux’s best friend, even running it on a windows virtual machine was a half as fast as running from a Windows host.
Anyhow, the hardware (with its Windows software) did a good job of processing 3,000 photos in just over a day’s ‘work’ (watching films whilst loading the in-tray).
It scans both sides so I can do a later sweep and add metadata, the writing on the back of photos, to the image file.
Once I’d scanned my many photos of various sizes I wanted a quick way of sorting the images - I thought one way would be by image size (since I scanned all the images at 600dpi - the max for ScanSnap, but adequate for old pics) - so I created the following script to loop through the files, sorting them into folders containing a certain size (pixel-area). I did some research as to what categories certain areas should represent and (back in Linux) wrote:
for file in *.jpg; do
thsimgsze=`identify $file | awk '{print $3}' | sed 's/x/ /;s/+/ /' | awk '{print $1*$2}'`
if [ $thsimgsze -lt "4700000" ]; then
mv $file "d4700000/"
elif [ $thsimgsze -lt "6000000" ]; then
mv $file "d6000000/"
elif [ $thsimgsze -lt "7300000" ]; then
mv $file "d7300000/"
elif [ $thsimgsze -lt "9500000" ]; then
mv $file "d9500000/"
elif [ $thsimgsze -lt "11600000" ]; then
mv $file "d11600000/"
elif [ $thsimgsze -lt "13400000" ]; then
mv $file "d13400000/"
fi
done