I am not sure I understand what you are asking!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 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/