Cut To Fit?
-
vav
-
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);
//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);
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
- Contact:
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.
Well it does try to scale reduce very very large images faster, but you can ignore that part.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Who is online
Users browsing this forum: No registered users and 10 guests