Imagick::setImageResolution
PHP function
Edit on GitHub ✎
(PECL imagick 2, PECL imagick 3)
Sets the image resolution
Description
Imagick::setImageResolution(float $x_resolution, float $y_resolution): bool
Sets the image resolution.
Parameters
x_resolutiony_resolution
Return Values
Success
Errors/Exceptions
Throws
Examples
php
<?php
function setImageResolution($imagePath) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->setImageResolution(50, 50);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>