Imagick
PHP Manual

Imagick::setImageCompressionQuality

(No version information available, might only be in Git)

Imagick::setImageCompressionQualitySets the image compression quality

Descrierea

bool Imagick::setImageCompressionQuality ( int $quality )

Sets the image compression quality.

Parametri

quality

The image compression quality as an integer

Valorile întoarse

Întoarce TRUE în caz de succes.

Erori/Excepții

Emite ImagickException în caz de eroare.

Exemple

Example #1 Imagick::setImageCompressionQuality()

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

?>


Imagick
PHP Manual