Help:Book scan processing

From Wayne County, Ohio Online Resource Center
Revision as of 10:23, 28 October 2014 by Jferrell (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Splitting scanned pages in GIMP

Basically: open an image, duplicate it, prepare and crop one image to page on left and save it, prepare and crop the other image to page on right and save it.

  1. Open the image to be split.
  2. Ctrl + D to duplicate the image.
  3. Shift + R to rotate the image.
    1. In "Tool Options":
      • Ensure that "Corrective (Backward)" is selected under "Direction".
      • Uncheck "Show image preview" if it is checked.
    2. Align grid lines so that they are parallel with text on target page (as much as possible).
    3. Hit ENTER to rotate the image.
  4. Shift + C to crop the target page.
    1. Draw a rectangle around the target page.
    2. Adjust so that as much is selected as possible without including transparency or the opposite page.
    3. Hit ENTER to crop the page.
  5. Ctrl + Shift + E to export the cropped page.
    1. Make sure you export to the correct directory.
    2. Name it the series name followed by a page indicator. For example: European_Emigration-p216.jpg for page 216 of the "European Emigration" book scan.
    3. Click the "Export" button.
    4. Enter 50 in box to the right of "Quality".
    5. Click the "Export" button.
  6. Ctrl + W to close the image. (Discard changes.)
  7. Now—on the duplicate of the image you first loaded—rotate, crop, and export the opposite page. So if you just finished page 216, you would now target 217.
  8. Open the next scanned image and repeat this procedure.


Bash one liners

For PDF files that simply need converted to JPG:

for file in *.[pP][dD][fF]; do convert -colorspace RGB -interlace none -density 200 -quality 100 $file ${file%%[pP][dD][fF]}jpg; done; mogrify -fuzz 15% -trim +repage *.jpg


For PDF files that need rotated use +distort SRT '90' for a 90° clockwise rotation:

for file in *.[pP][dD][fF]; do convert -colorspace RGB -interlace none -density 200 -quality 100 +distort SRT '90' $file ${file%%[pP][dD][fF]}jpg; done; mogrify -fuzz 15% -trim +repage *.jpg