Page 1 of 1

Re: How do I identify border around the image?

Posted: 2009-03-28T11:52:27-07:00
by fmw42
developer wrote:I need to be able to find a border around the image. The border can be either of the same color or shaded.
I am not sure I understand what you are asking!

I don't think IM can just tell you directly if/where a border is located and how big it is.

But you can extract a mask image that might contain just the border.

try -fuzz XX% -threshold XX%

see
http://www.imagemagick.org/script/comma ... ptions.php
http://www.imagemagick.org/Usage/quantize/#threshold

That will create a binary image that might show the border only. This mask can be used for further processing.

If you want to ADD or REMOVE a known size border see
http://www.imagemagick.org/Usage/crop/

Re: How do I identify border around the image?

Posted: 2009-04-27T21:53:12-07:00
by anthony
Also look at using -fuzz and -trim