Imagick::setImageResolution

(PECL imagick 2.0.0)

Imagick::setImageResolutionSets the image resolution

˵��

Imagick::setImageResolution ( float $x_resolution , float $y_resolution ) : bool

Sets the image resolution.

����

x_resolution

y_resolution

����ֵ

�ɹ�ʱ���� TRUE��

�����쳣

����ʱ�׳� ImagickException��

����

Example #1 Imagick::setImageResolution()

<?php
function setImageResolution($imagePath) {
    
$imagick = new \Imagick(realpath($imagePath));
    
$imagick->setImageResolution(5050);
    
    
header("Content-Type: image/jpg");
    echo 
$imagick->getImageBlob();
}

?>