Imagick::resampleImage

(PECL imagick 2, PECL imagick 3)

Imagick::resampleImageResample image to desired resolution

说明

public Imagick::resampleImage(
    float $x_resolution,
    float $y_resolution,
    int $filter,
    float $blur
): bool

Resample image to desired resolution.

参数

x_resolution

y_resolution

filter

blur

返回值

成功时返回 true

示例

示例 #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();
}

?>

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top