Batch scan photos of the same size
Go to file
Keith Irwin c56e835e02
Updated link
2023-03-10 10:47:38 -07:00 Initial commit 2021-07-06 23:14:17 -06:00 Updated link 2023-03-10 10:47:38 -07:00
scanpix Minor improvements 2023-03-10 10:44:07 -07:00


Batch scan photos of the same size

This script is intended to help you scan many photographs of the same size. It scans and crops at the same time so the scanner head only travels as far as the height of the photo. This makes photo scanning much faster.

Each scan of a photo takes about 30-60 seconds. That's long enough for the scanner operator to get bored and start doing other work. But the other work can distract the operator from switching photos and starting the next scan. scanpix lets the operator do other work, only forcing interaction when needed.

After starting scanpix and setting the correct photo dimensions and target directory, scanpix disappears and lets the user get on with other business. When the photo has been scanned and saved, the user is shown a gui prompt to lay down the next photo and click "ok" or press "enter". Then the prompt disappears and the scanner gets to work on the new photo.



On ubuntu or debian:

sudo apt install zenity scanimage

Download and install

sudo git clone /usr/local/src/scanpix && \
sudo ln -s /usr/local/src/scanpix/scanpix /usr/local/bin/scanpix


cd /usr/local/src/scanpix
sudo git pull


scanpix takes one optional argument, a directory to put scanned files into. This will be prompted for anyway

scanpix [destination]

First, scanpix will attempt to detect a scanner. If nothing happens, try starting scanpix in a terminal and watch the output.

Once a scanner is found, the user will be prompted with a gui to enter a target directory and photo dimensions (in millimeters). You will probably want to tweak these values after the first scan.

If possible, always lay the photos with the shorter dimension in the same direction as the scanner travel. The scanner head will only move as far as the photo boundaries so orienting the photo correctly will significantly improve scan speeds.

The photo will be named after the unix timestamp ("$(date +%s).jpg") so there shouldn't be any filename collisions. After scanning each photo, lay the next one and click Ok when the prompt comes up. When you reach the last photo of that size, just click Quit to stop scanning.

Thunar custom actions

If you use thunar, you might find it helpful to set up a custom action for scanpix. That way you can right click in any directory to start scanning photos there!

  • Open thunar
  • Edit | Configure custom actions...
  • Click the +
  • For Name, enter Scan images here
  • For Description, enter Bulk photo scan with scanpix
  • For Command, enter /usr/local/bin/scanpix
  • Add any icon if you wish
  • Click on the Appearance Conditions tab
  • Under File Pattern enter *
  • Uncheck all the checkboxes except Directories
  • Click OK


scanpix - Batch scan photos of the same size
Copyright © 2016-2023 Keith Irwin

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see