array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'imagick.setimageresolution.php', 1 => 'Imagick::setImageResolution', ), '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', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL imagick 2, PECL imagick 3)
Imagick::setImageResolution — Sets the image resolution
Sets the image resolution.
x_resolution
y_resolution
Retorna true
em caso de sucesso.
Lança uma exceção ImagickException em caso de erro.
Exemplo #1 Imagick::setImageResolution()
<?php
function setImageResolution($imagePath) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->setImageResolution(50, 50);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>