How realize "Auto crop" ?

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

use MagickTrimImage() to trim a border from an image.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

You did not provide enough fuzz. Try this:
  • MagickTrimImage(wand_test,15.0*QuantumRange/100.0)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We looked at image1.jpg and it does not have a consistent border (there is a white line near the top) so the auto-trim algorithm won't work for these types of images.
Post Reply