Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Contact:
Post
by fmw42 » 2009-03-28T11:52:27-07:00
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/
anthony
Posts: 8883 Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia
Contact:
Post
by anthony » 2009-04-27T21:53:12-07:00
Also look at using -fuzz and -trim
Users browsing this forum: No registered users and 27 guests