array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'imagick.setimageresolution.php', 1 => 'Imagick::setImageResolution', 2 => 'Sets the image resolution', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.setimagerenderingintent.php', 1 => 'Imagick::setImageRenderingIntent', ), 'next' => array ( 0 => 'imagick.setimagescene.php', 1 => 'Imagick::setImageScene', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/setimageresolution.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

Imagick::setImageResolution

(PECL imagick 2, PECL imagick 3)

Imagick::setImageResolutionSets the image resolution

Опис

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

Sets the image resolution.

Параметри

x_resolution

y_resolution

Значення, що повертаються

Повертає true в разі успіху.

Помилки/виключення

Кидає ImagickException в разі помилки.

Приклади

Приклад #1 Imagick::setImageResolution()

<?php
function setImageResolution($imagePath) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->setImageResolution(50, 50);

header("Content-Type: image/jpg");
echo
$imagick->getImageBlob();
}

?>