Imagick::setImageResolution

(PECL imagick 2.0.0)

Imagick::setImageResolutionSets the image resolution

Descrição

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

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();
}

?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top