Fill Area Flag and centered image crop

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.

Fill Area Flag and centered image crop

Post by kevinf »

I'm trying to do something just like this in imagick:
convert dragon.gif -resize 64x64^ \
-gravity center -crop 64x64+0+0 +repage fill_crop_dragon.gif

Image into Image
This is an example i took here:
However i do not know how to do like the fill area flag ^ to take the smallest side and cut the longest one.. i also don't know how to use a centered gravity crop.. can anyone help?
for now i use something like:

MagickCropImage( $resource, $maxWidth, $maxHeight, 0, 0 ) ;
MagickSetImagePage($resource, $maxWidth, $maxHeight, 0, 0);
MagickResizeImage( $resource, $maxWidth, $maxHeight, MW_QuadraticFilter, 1.0 );

but no centered crop and no fill area..