Open In App

PHP | Imagick getImageGamma() Function

Last Updated : 26 Aug, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
The Imagick::getImageGamma() function is an inbuilt function in PHP which is used to get the Gamma value of the image. The Gamma is a nonlinear operation used to encode and decode luminance or tristimulus values in images. Syntax:
float Imagick::getImageGamma( void )
Parameters: This function does not accepts any parameters. Return Value: This function returns True on success. Errors/Exceptions: It throws an ImagickException on error. Below program illustrates the Imagick::getImageGamma() function in PHP: Program: php
<?php 
// require_once('path/vendor/autoload.php'); 
 
// Create a new Imagick Object
$image = new Imagick(
'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-14.png');
 
// getImageGamma function
$size = $image->getImageGamma();

// Display the colorspace
print_r($size);
?>
<?php 
Output:
0.45454999804497
Related Articles: Reference: http://php.net/manual/en/imagick.getimagegamma.php

Next Article

Similar Reads