affected version ImageMagick-6.6.1-7 and possibly previous too. at least ImageMagick-6.5.9-10 has same code.
Please check Image::extent code and compare with similar functionality in mogrify.c
ExtentImage doesn't change original image (isn't it) so we should use something like this in extent method:
MagickCore::Image* newImage = ExtentImage ( image(), &extentInfo, &exceptionInfo );
replaceImage( newImage );
Magick++ Image::extent doesn't work
Re: Magick++ Image::extent doesn't work
We can reproduce the problem you posted and have a patch in ImageMagick 6.6.1-8 Beta available by sometime tomorrow. Thanks.