The Imagick::getCompressionQuality() function is an inbuilt function in PHP which is used to get the object compression quality.
Syntax:
int Imagick::getCompressionQuality( void )
Parameters: This function does not accept any parameters.
Return Value: This function returns an integer value on success.
Below programs illustrate the Imagick::getCompressionQuality() function in PHP:
Program 1:
<?php // Create a new imagick object $imagick = new Imagick( // Get the Compression quality $compressionQuality = $imagick ->getCompressionQuality(); echo $compressionQuality ; ?> |
Output:
0
Program 2:
<?php // Create a new imagick object $imagick = new Imagick( // Set the Compression quality $imagick ->setCompressionQuality(50); // Get the Compression quality $compressionQuality = $imagick ->getCompressionQuality(); echo $compressionQuality ; ?> |
Output:
50
Reference: https://www.php.net/manual/en/imagick.getcompressionquality.php