Code: Select all
#include <Magick++.h>
using namespace Magick;
main(int argc, char**argv)
{
InitializeMagick(*argv);
Image source_image("foo.png");
Image sub_image(source_image);
sub_image.chop(Geometry(100,100));
sub_image.crop(Geometry(200,200));
}
Code: Select all
terminate called after throwing an instance of 'Magick::WarningOption'
what(): ep: geometry does not contain image `foo.png' @ warning/transform.c/CropImage/574
Aborted (core dumped)
foo.png PNG 4517x5906 5218x7112+338+205 8-bit PseudoClass 2c 385KB 0.190u 0:00.100
I am not sure if this is a bug in the documentation, magick++, or me. Any help would be great. Thanks.
-seth