(PECL imagick 2, PECL imagick 3)
Imagick::resampleImage — Resample image to desired resolution
$x_resolution
,$y_resolution
,$filter
,$blur
Resample image to desired resolution.
x_resolution
y_resolution
filter
blur
Returns true
on success.
Example #1 Imagick::resampleImage()
<?php
function resampleImage($imagePath) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->resampleImage(200, 200, \Imagick::FILTER_LANCZOS, 1);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>