I need to scan lots of small items with quite similar, but not the exact same, size.
What I thought I'd like to do is:
Run a linux command line tool with the file name as a parameter which runs the scanner until about 10% of the whole scanner size and crops the image to the content that is not white (a square would be fine).
Does anybody know if this is possible and when how?
Thanks in advance!
Best Answer
What you need is
convert
from imagemagick. First installimagemagick
for your distribution. On debian derived systems run this command:Now, if you just want to remove whitespace do this:
This assumes your images are PNGs, if not change the above line accordingly.
If you need fancier resizing, have a look at the imagemagick documentation, you can do just about anything you can imagine with it.
So, your actual workflow would be: