Page 1 of 1

Fill Area Flag and centered image crop

Posted: 2008-03-19T22:26:17-07:00
by kevinf
Hello,
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: http://www.imagemagick.org/Usage/resize/
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..

thanks!