Page 1 of 1

Scan of print produced large white area, how to remove

Posted: 2016-10-17T13:48:16-07:00
by purplenate26
This photo at the Link. Please click on it and view full size.
https://goo.gl/photos/xeavHxUac5AtdNMYA That is a scan of a print. How do I remove the large white area. Do I use crop, but how to find the right settings for crop. I want to remove the large white area and leave just the picture. I also need to do a batch operation on 38 other photos as well with the same type of scanned white area.

I tried this and it failed;

Code: Select all

convert 1.png -shave 10x10 -bordercolor white -border 1x1  -fuzz 20% -trim trimmed.png
Do I need to use crop instead? How can I get imagemagick to auto crop.

Ubuntu Linux 16.10. Using command line.

Code: Select all

convert -version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-08-15 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib

Re: Scan of print produced large white area, how to remove

Posted: 2016-10-17T14:43:35-07:00
by Bonzo
Increasing your shave to 50x50 helps to remove the grey area bottom left which I assume was stopping the trim. And I had to increase the fuzz to about 80% due to the bluish smudges on the white area.

You could probably reduce the shave and fuzz amounts a bit but I did larger values to prove it will work.

Re: Scan of print produced large white area, how to remove

Posted: 2016-10-17T21:01:50-07:00
by purplenate26
That did the trick. Thank you very much.