Page 1 of 1

GravityType argument ignored in Magick::Image::extent

Posted: 2012-05-13T11:20:24-07:00
by muni
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:

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;
}

Re: GravityType argument ignored in Magick::Image::extent

Posted: 2012-05-13T16:04:01-07:00
by magick
We can reproduce the problem you reported and have a patch. Look for it in the ImageMagick-6.7.6-10 release within a week or two. Thanks.