Let me begin by saying that I am not talented with Gimp. I learned to do this by trial and error, and I want to share it with you.
Getting Set Up
It actually took me awhile to get set up because it took me so long to evaluate the different tools and once I settled on the Batch Divide Scanned Images Plugin for Gimp, it took me another couple of hours to piece it together.
The main discussion of the Batch Divide Scanned Images tool is on the GimpTalk forum with the actual project hosting at the Gimp Plugin Registry.
I am a 64-bit Ubuntu linux user, so my installation instructions and files are intended primarily for that setup:
- Make sure gimp is installed.
- Put the DivideScannedImages.scm file in the /usr/share/gimp/2.0/scripts/ folder. (The link is for version 1.9. Huanix Mirror)
wget http://ffaat.pointclark.net/incoming/scripts/DivideScannedImages.scm /usr/share/gimp/2.0/scripts - Get deskew. This project is hard to get for some reason. The relevant discussion is here. I ended up compiling my own. It is not difficult to compile, but I did have to install libgimp2.0-dev (i think) which took me forever to figure out. This binary deskew gimp plugin is built for 64 bit ubuntu. Copy the file to /usr/lib/gimp/2.0/plug-ins/ (make sure it’s executable).
wget http://www.huanix.com/files/gimp/deskew /usr/lib/gimp/2.0/plug-ins/(ONLY 64bit linux!) - Restart Gimp. At this point you should have a working slicer and deskewer, but you’ll want test it for awhile. I had to tinker with deskew by trial and error.
- When you open Gimp, you should have a new menu item under Filters > Batch Tools
Using the Batch Divide Tool
Using the batch image cutting tool in Gimp (Batch Tools > Divide Scanned Images). This Gimp plugin separates multiple images from one scan and can straighten as well deskew them (that is, make them not crooked). Even though it is supposed to be intuitive, it took me a long time to understand all of the setttings.
- Selection Threshold: This slider operates the magic wand tool in Gimp. You can open a test image with gimp and test the tool to accurately select your images without selecting too much “junk”. I routinely use 25 without problems.
- Size Threshold: What is the smallest an image can be, while still being considered an image? You can use the selection tool on a sample image to find your own threshold; I use 200 without any trouble.
- Abort Limit: Took me forever to figure out. Abort limit means, “Stop looking for images in a scan after x images.” Or, with an abort limit of 3, the Divide Scanned Images tool will not look for a 4th or 5th image in the scan, they will simply be ignored. I think this is a sanity check to make sure the tool doesn’t try to process images that don’t exist. Set this value to the number of images per scan. (I use 2 because my scan bed is small, you might use 4)
- Background Sample Corner: This is used to find a clean blank point from which the Divide Scanned Images tool will use the magic wand. Top Left corner is fine. (See the image below for more detail)
- Background Sample X Offset: The tool needs to find a good place to take the magic wand sample from. I use 60 for both of these values and make sure I don’t put a picture in the upper left corner.
- Background Sample Y Offset: I use 60 here as well. Same as the X offset.
The Background Sample Corner must be free of pictures so that the magic wand tool can get a clean sample. I suggest using the top left corner, and setting the x and y offset high enough that it gets “inside” the image. I like to use an offset of 60, and then leave a square inch in the corner free of pictures. The red box in this image shows the region where I wouldn’t put any picture.
Incoming search terms:
- Divide Scanned Images
- divide scanned photos
- gimp divide scanned images
- divide scanned images gimp
- Dividescannedimages scm
- DivideScannedImages
- gimp batch scan
- divide scanned images plugin gimp
- how do you divide your pictures on instagram
- opensuse gimp batch process images plugin



Thank you for detailed description.
Excellent work.
Hello! I followed this steps and was able to divide all my scanned images
Nevertheless, the “deskew” part never worked and some of my images ended up a bit crooked and unstraightened. Do you have any ideas why this is not working for me?
I am running Ubuntu 11.04
Thanks!
After installing DivideScannedImages.scm, I have copy deskew in my /home/jp/.gimp-2.6/plug-ins directory.
But deskew does not works
I just forgot to change the deskew file permission to”execute”…
After this permission change deskew worked fine
i use the divide scanned image on gimp for my scanned pics (to cut 4 images from one jpg). The resolution was reduced to 72 dpi, where as my scanned images are all 600 dpi. Can you please let me know how to use divide scanned images wihtout reducing the 600dpi ?
thank you in advance
Sanj
Thank you! This was very helpful. I was able to use the provided files to fix a bunch of scans on 64bit Ubuntu 10.4. This after several hours of trying to get deskew to compile and run. <.<