Thursday, October 9, 2025
HomeLanguagesPHP | Imagick getImageGamma() Function

PHP | Imagick getImageGamma() Function

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 
// require_once('path/vendor/autoload.php'); 
   
// Create a new Imagick Object
$image = new Imagick(
   
// 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

RELATED ARTICLES

Most Popular

Dominic
32348 POSTS0 COMMENTS
Milvus
87 POSTS0 COMMENTS
Nango Kala
6715 POSTS0 COMMENTS
Nicole Veronica
11878 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11941 POSTS0 COMMENTS
Shaida Kate Naidoo
6837 POSTS0 COMMENTS
Ted Musemwa
7095 POSTS0 COMMENTS
Thapelo Manthata
6791 POSTS0 COMMENTS
Umr Jansen
6791 POSTS0 COMMENTS