Imagick
PHP Manual

Imagick::setImageResolution

(PECL imagick 2.0.0)

Imagick::setImageResolutionSets the image resolution

Descrição

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

Sets the image resolution.

Parâmetros

x_resolution

y_resolution

Valor Retornado

Retorna TRUE no sucesso.

Erros

Lança ImagickException em caso de erro.

Exemplos

Exemplo #1 Imagick::setImageResolution()

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

?>


Imagick
PHP Manual