LaravelConf Taiwan 2020 CFP Started

Imagick::setImageCompressionQuality

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

Imagick::setImageCompressionQualitySets the image compression quality

Description

Imagick::setImageCompressionQuality ( int $quality ) : bool

Sets the image compression quality.

Parameters

quality

The image compression quality as an integer

Return Values

Returns TRUE on success.

Errors/Exceptions

Throws ImagickException on error.

Examples

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

?>

add a note add a note

User Contributed Notes

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