Page 1 of 1

Posted: 2006-12-07T06:45:00-07:00
by vav
You can find out original image sizes. So you'll be able to calculate sizes for resize operation and shifts for cropping.

Posted: 2006-12-11T11:04:54-07:00
by monsters
yeah,

//get the width/height
$oWidth =MagickGetImageWidth($sourceWand);
$oHeight =MagickGetImageHeight($sourceWand);

//then decide what size you want to cut out
$width = $oWidth/2;
$height= $oHeight /2;

set the //x and y
$x = ($oWidth - $width) / 2
$y = ($oheight - $height) / 2

cut the image
//cropping the image
MagickCropImage( $sourceWand, (double)$width, (double)$height, (double)$x, (double)$y);

Posted: 2006-12-13T22:49:57-07:00
by anthony
The -thumbnail option is basically a -resize with a -strip thrown in.

Well it does try to scale reduce very very large images faster, but you can ignore that part.