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?".
I am trying to trim single edges one by one (for counting the number of pixels removed from each side), using Magick++. I can make this work using the command line:
convert oldimage.PNG -gravity West -background white -splice 5x0 -background black -splice 5x0 newImage.PNG
Like described here http://www.imagemagick.org/Usage/crop/#trim_oneside
Now I am having to use system(strCommandLineCommand); then read the image from the disk, then trim() and chop(), from inside my application, and this is obviously sub-optimal. How can I simulate the splicing gravity from within my program without having to use the command line? splice() only seems to allow splicing onto the north or the east.
We added a splice() method to Magick++ in ImageMagick 6.5.6-6 Beta available sometime tomorrow. In the mean-time you can use any MagickCore API method (e.g. MagickCore::SpliceImage()).