Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Batch processing - detecting various colours to crop to edge of scanned document JPG?
#12
Maybe as a starter, Gimp can add a pair of guides at a point using the measure tool. Ctrl-Alt and a click-and-click again adds the guides. The bottom right corner.

To get those to crop, bound to be a better way but...

Add guides at the top left corner
Already have the guides bottom right corner
Make a selection from the guides
Invert selection and fill to remove the discolored border.
Zealous crop to the content.

In the zip two files, for_crop.py  Guides-to-selection-mk2.scm  the .py goes in your plugins folder / .scm in your scripts folder.

Still hands on, add your bottom-right guides, invoke the plugin Tools -> for_crop Make a keyboard shortcut (I used Z ) a bit quicker.

Example: https://i.imgur.com/oYi4TRG.mp4 about 40 seconds.

What it does not do is (1) Save/Export the image (2) move on to the next image, although Ofnuts has such a plugin. see: earlier post.

One for Ofnuts: Image -> Crop to Selection menu entry but not in pdb ?


Attached Files
.zip   for_crop.zip (Size: 1.51 KB / Downloads: 135)
Reply


Messages In This Thread
RE: Batch processing - detecting various colours to crop to edge of scanned document JPG? - by rich2005 - 06-30-2022, 02:50 PM

Forum Jump: