PHP | Gmagick enhanceimage() Function Last Updated : 24 Mar, 2021 Comments Improve Suggest changes Like Article Like Report The Gmagick::enhanceimage() function is an inbuilt function in PHP which is used to improve the quality of a noisy image. This function applies the digital filter to improve quality.Syntax: Gmagick Gmagick::enhanceimage( void ) Parameters: This function does not accepts any parameter.Return Value: This function returns enhanced Gmagick object.Errors/Exceptions: This function throws GmagickException on error.Below programs illustrate the Gmagick::enhanceimage() 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'); // Enhance the image. $gmagick->enhanceimage(); 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); // Enhance the image. $gmagick->enhanceimage(); // Display the output image header("Content-Type: image/png"); echo $gmagick->getImageBlob(); ?> Output: Reference: http://php.net/manual/en/gmagick.enhanceimage.php Comment More infoAdvertise with us Next Article PHP | Gmagick enhanceimage() Function S sarthak_ishu11 Follow Improve Article Tags : Web Technologies PHP Image-Processing PHP-function PHP-Gmagick +1 More Similar Reads PHP | Imagick enhanceImage() Function The Imagick::enhanceImage() function is an inbuilt function in PHP which is used to improve the quality of a noisy image. This function applies the digital filter to improve quality. Syntax: bool Imagick::enhanceImage( void ) Parameter: This function does not accepts any parameter. Return Value: Thi 1 min read PHP | Gmagick edgeimage() Function The Gmagick::edgeimage() function is an inbuilt function in PHP which is used to enhance the image edges using convolution filter of the given radius. Radius 0 is used as auto-selected.Syntax:Â Â Gmagick Gmagick::edgeimage( $radius ) Parameters: This function accepts a single parameter as $radius whi 1 min read PHP | Gmagick frameimage() Function The Gmagick::frameimage() function is an inbuilt function in PHP which is used to add a simulated three-dimensional border around the image. The width and height specify the border width of the vertical and horizontal sides of the frame. The inner and outer bevels indicate the width of the inner and 2 min read PHP | Gmagick addImage() Function The Gmagick::addImage() function is an inbuilt function in PHP which is used to adds new image to Gmagick object image list. This function adds a new image to Gmagick object from the current position of the source object. The Gmagick class have the ability to hold and operate on multiple images simu 2 min read PHP | Gmagick equalizeimage() Function The Gmagick::equalizeimage() function is an inbuilt function in PHP which is used to equalizes the histogram of an image.Syntax:Â Gmagick Gmagick::equalizeimage( void ) Parameters: This function does not accepts any parameter. Return Value: This function returns equalized Gmagick object. Errors/Exce 1 min read Like