Crop() does not gravitate?
Posted: 2009-12-06T01:42:15-07:00
Try: ... it fails to gravitate. It only crops from top left regardless of the gravity setting. Any ideas?
I've also tried this one and it had failed:
This is with:
ActivePerl 5.10.1 build 1006
ImageMagick (dll) 6.5.8 Q16
Apache 2.2.14 (32-bit Windows 7)
#####Update
I've found a quirky work-around. For some reason I have to overwrite the variable?
This works:
Adding $image = $image seems kind of silly. Is this a bug or what?
Also, Crop() still doesn't work with gravity when trying this quirky method.
If it helps, I've also pulled this oddity from my server's error.log:
Code: Select all
$image->Crop(Gravity=>'Center', height=>'100', width=>'100');
I've also tried this one and it had failed:
Code: Select all
$image->Transform(crop=>$width.'x'.$height.'+0+0', gravity=>'Center');
ActivePerl 5.10.1 build 1006
ImageMagick (dll) 6.5.8 Q16
Apache 2.2.14 (32-bit Windows 7)
#####Update
I've found a quirky work-around. For some reason I have to overwrite the variable?
This works:
Code: Select all
$image = $image->Transform(crop=>$height.'x'.$height.'+0+0', gravity=>'Center');
Also, Crop() still doesn't work with gravity when trying this quirky method.
If it helps, I've also pulled this oddity from my server's error.log:
Code: Select all
Can't locate object method "GetAttribute" via package "Exception 410: unrecognized option `gravity' @ Magick.xs/XS_Image__Magick_Mogrify/6953" (perhaps you forgot to load "Exception 410: unrecognized option `gravity' @ Magick.xs/XS_Image__Magick_Mogrify/6953"?)