Scan of print produced large white area, how to remove

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
purplenate26
Posts: 3
Joined: 2016-10-17T13:37:44-07:00
Authentication code: 1151

Scan of print produced large white area, how to remove

Post 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
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

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

Post 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.
purplenate26
Posts: 3
Joined: 2016-10-17T13:37:44-07:00
Authentication code: 1151

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

Post by purplenate26 »

That did the trick. Thank you very much.
Post Reply