PHP | Gmagick gammaimage() Function Last Updated : 18 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The Gmagick::gammaimage() function is an inbuilt function in PHP which is used to corrects the image by providing the Gamma-correction. The view of the same images is different on the different devices. In this way, the image intensities are represented on the screen. Syntax: Gmagick Gmagick::gammaimage( $gamma ) Parameters: This function accepts a single parameters $gamma which holds the value of gamma-correction. Return Value: This function returns gamma corrected Gmagick object. Errors/Exceptions: This function throws GmagickException on error. Below programs illustrate the Gmagick::gammaimage() function in PHP: Program 1: Original Image: php <?php // Create a Gmagick object $gmagick = new Gmagick( 'https://media.geeksforgeeks.org/wp-content/uploads/tech.png'); // Use gammaimage() function $gmagick->gammaimage(5); header('Content-type: image/png'); // Output the image echo $gmagick; ?> Output: Program 2: php <?php // Create a GmagickDraw object $draw = new GmagickDraw(); // Create GmagickPixel object $strokeColor = new GmagickPixel('Red'); $fillColor = new GmagickPixel('Green'); // Set the color, opacity of image $draw->setStrokeOpacity(1); $draw->setStrokeColor('Red'); $draw->setFillColor('Green'); // Set the width and height of image $draw->setStrokeWidth(7); $draw->setFontSize(72); // Function to draw circle $draw->circle(250, 250, 100, 150); $gmagick = new Gmagick(); $gmagick->newImage(500, 500, 'White'); $gmagick->setImageFormat("png"); $gmagick->drawImage($draw); // Use gammaimage() function $gmagick->gammaimage(10); // Display the output image header("Content-Type: image/png"); echo $gmagick->getImageBlob(); ?> Output: Reference: http://php.net/manual/en/gmagick.gammaimage.php Comment More infoAdvertise with us Next Article PHP | Gmagick gammaimage() Function S sarthak_ishu11 Follow Improve Article Tags : Web Technologies PHP Image-Processing PHP-function PHP-Gmagick +1 More Similar Reads PHP | Imagick gammaImage() Function The Imagick::gammaImage() function is an inbuilt function in PHP which is used to corrects the image by providing the Gamma-correction. The view of the same images on different devices will have perceptual differences in the way the image's intensities are represented on the screen. Syntax: bool Ima 1 min read PHP | Gmagick getimagetype() Function The Gmagick::getimagetype() function is an inbuilt function in PHP which is used to get the image type. Syntax: int Gmagick::getimagetype( void ) Parameters: This function doesnât accept any parameters. Return Value: This function returns an integer value corresponding to one of the IMGTYPE constant 1 min read PHP | Gmagick getimagegamma() Function The Gmagick::getimagegamma() function is an inbuilt function in PHP which is used to get the image gamma. The Gamma is a nonlinear operation used to encode and decode luminance or tristimulus values in images. Syntax: float Gmagick::getimagegamma( void ) Parameters: This function doesnât accept any 1 min read PHP | Gmagick getimagescene() Function The Gmagick::getimagescene() function is an inbuilt function in PHP which is used to get the image scene of an image. Syntax: int Gmagick::getimagescene( void ) Parameters: This function does not accept any parameter. Return Value: This function returns the image scene. Errors/Exceptions: This funct 1 min read PHP | Gmagick getImageMatte() Function The Gmagick::getImageMatte() function is an inbuilt function in PHP which is used to get the matte channel of an Gmagick object. Syntax: int Gmagick::getimagematte( void ) Parameters: This function does not accept any parameter. Return Value: This function returns True if image contains matte channe 1 min read Like