GravityType argument ignored in Magick::Image::extent
Posted: 2012-05-13T11:20:24-07:00
Hello,
I'm using Magick++ library shipped with ImageMagick 6.7.6.9 and I have a problem with setting gravity while extending an image with Image::extent() method. No matter what value of gravity_ I pass, the original portion of an image stays at top left corner of resulting image. Here is some sample code that I've tested:
I'm using Magick++ library shipped with ImageMagick 6.7.6.9 and I have a problem with setting gravity while extending an image with Image::extent() method. No matter what value of gravity_ I pass, the original portion of an image stays at top left corner of resulting image. Here is some sample code that I've tested:
Code: Select all
#include <Magick++.h>
using namespace Magick;
int main(int argc, char **argv)
{
Image image(argv[1]);
image.extent(Geometry(800, 600), CenterGravity);
image.write("extended.png");
return 0;
}