(PECL imagick 2.0.0)
Imagick::resampleImage — Resample image to desired resolution
$x_resolution
, float $y_resolution
, int $filter
, float $blur
)Resample image to desired resolution.
x_resolution
y_resolution
filter
blur
成功时返回 TRUE
。
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();
}
?>