PHP | Imagick getImageHistogram() Function Last Updated : 20 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::getImageHistogram() function is an inbuilt function in PHP which is used to get the image histogram. Syntax: array Imagick::getImageHistogram( void ) Parameters: This function does not accept any parameter. Return Value: This function returns an array of ImagickPixel objects containing histogram of image. Exceptions: This function throws ImagickException on error. Below program illustrates the Imagick::getImageHistogram() function in PHP: Program 1: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Get the Histogram $histogram = $imagick->getImageHistogram(); print("<pre>".print_r($histogram, true)."</pre>"); ?> Output: Returns an array with 2955 Imagick objects as members. Program 2: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/20190918234528/colorize1.png'); // Get the Histogram $histogram = $imagick->getImageHistogram(); print("<pre>".print_r($histogram, true)."</pre>"); ?> Output: Returns an array with 1725 Imagick objects as members. Reference: https://www.php.net/manual/en/imagick.getimagehistogram.php Comment More infoAdvertise with us Next Article PHP | Imagick getImageHistogram() Function gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Gmagick getimagehistogram() Function The Gmagick::getimagehistogram() function is an inbuilt function in PHP which is used to get the image histogram. This function returns all the pixels from the picture in the form of an array of Gmagick pixels. We can use this function to analyze the color of any picture pixel by pixel. Syntax: arra 2 min read 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 n 1 min read PHP | Imagick getImageFormat() Function The Imagick::getImageFormat() function is an inbuilt function in PHP which is used to get the format of a particular image in a sequence Syntax:  string Imagick::getImageFormat( void ) Parameters: This function does not accepts any parameter. Return Value: This function returns a string of the imag 1 min read PHP | Imagick getImageHeight() Function The Imagick::getImageHeight() function is an inbuilt function in PHP which is used to get the height of the image. Syntax: int Imagick::getImageHeight( void ) Parameters: This function does not accepts any parameter. Return Value: This function returns the image height in pixels. Original Image: Bel 1 min read PHP | Imagick getImageDistortion() Function The Imagick::getImageDistortion() function is an inbuilt function in PHP which is used to compare an image with reconstructed image and returns the specified distortion metric. Syntax: float Imagick::getImageDistortion(Imagick $reference, int $metric) Parameters: This function accepts two parameters 2 min read PHP | imagick getImageDispose() Function The Imagick::getImageDispose() function is an inbuilt function in PHP which is used to get the image disposal method. Syntax: int Imagick::getImageDispose( void) Parameters: This function does not accept any parameter. Return Value: This function returns the dispose method on success. Below programs 1 min read PHP | Imagick getImageExtrema() Function The Imagick::getImageExtrema() function is an inbuilt function in PHP which is used to get the extrema for an image. Extrema are the points at which a maximum or minimum value of a function is observed. Syntax: array Imagick::getImageExtrema( void ) Parameters: This function doesn't accept any param 1 min read PHP | Imagick getImageUnits() Function The Imagick::getImageUnits() function is an inbuilt function in PHP which is used to get the units of resolution of a particular image. Syntax:  int Imagick::getImageUnits( void ) Parameters: This function does not accepts any parameter.Return Value: This function returns an integer of the image un 1 min read PHP | Imagick getImagesBlob() Function The Imagick::getImageBlob() function is an inbuilt function in PHP which is used to get the all the image sequences as a blob. This function is useful for animated gifs as doing getImageBlob() on them won't work. This function implements direct to memory image formats. Syntax: string Imagick::getIma 1 min read PHP | Imagick getImageWidth() Function The Imagick::getImageWidth() function is an inbuilt function in PHP which is used to get the width of the image. Syntax: int Imagick::getImageWidth( void ) Parameters: This function does not accepts any parameters. Return Value: This function returns the image width in pixels. Original Image Below p 1 min read Like