(PECL imagick 2.0.0)
Resample image to desired resolution
bool Imagick::resampleImage ( float $x_resolution, float $y_resolution, int $filter, float $blur )
Resample image to desired resolution.
Parameters:
x_resolution
Resample image to desired resolution.
y_resolution
Resample image to desired resolution.
filter
Resample image to desired resolution.
blur
Resample image to desired resolution.
Returns:
Returns TRUE
on success.
Examples:
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(); } ?>
Please login to continue.