Monday, 7 May 2007

Scanning old photos

I've just scanned in 300 photos from 1991-1994. The photos were remarkably well preserved- they've been kept under plastic and kept in boxes/albums. They were all 6x4s, so 4 fitted onto our A4 scanner nicely.
I Used Ubuntu on my Thinkpad to scan them in - remarkably easy using the sane-utils to scan.
For our A4 sized Canon LiDE scanner I used the following:

sudo apt-get install sane-utils

Check in xsane that the scanner is recognised.

scanimage -L

On a Dell Vostro 1700:

scanimage -x 215 -y 297 --resolution 400 -d plustek:libusb:004:002 >filename.pnm

Assuming you are scanning 6x4" photos, we can approximate the 4 scans per platter, I used the following shell script.

for FILE in *.pnm
echo ${FILE}
NEWFILE=`echo ${FILE} | cut -f1 -d'.'`
echo $NEWFILE.jpg
convert ${FILE} +gravity -crop 1729x2428 DONE/${NEWFILE}_%d.jpg

Chop the image back into 4 photos using gimp, fix rotation on the sloppy scans and all done.

No comments: