PHP | Imagick getImageChannelExtrema() Function Last Updated : 20 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::getImageChannelExtrema() function is an inbuilt function in PHP which is used to get the extrema for one or more image channels. Extrema are the points at which a maximum or minimum value of a function is observed. It returns an associative array with the keys "minima" and "maxima". Syntax: array Imagick::getImageChannelExtrema(int $channel) Parameters: This function accepts single parameter $channel which specifies the channel constant that is valid for your channel mode. Use bitwise operator to combine channeltype constants. Exceptions: This function throws ImagickException on error. Return Value: This function returns TRUE on success. Below programs illustrate the Imagick::getImageChannelExtrema() function in PHP: Program 1: php <?php // Create new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Get the extrema with CHANNEL constant as 0 // which corresponds to imagick::CHANNEL_UNDEFINED $extrema = $imagick->getImageChannelExtrema(0); print_r($extrema); ?> Output: Array ( [minima] => 0 [maxima] => -9223372036854775808 ) Program 2: php <?php // Create new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/20190918234528/colorize1.png'); // Get the extrema with CHANNEL constant as 6 // which corresponds to imagick::CHANNEL_BLUE $extrema = $imagick->getImageChannelExtrema(6); print_r($extrema); ?> Output: Array ( [minima] => 5654 [maxima] => 65535 ) Reference: https://www.php.net/manual/en/imagick.getimagechannelextrema.php Comment More infoAdvertise with us Next Article PHP | Imagick getImageChannelExtrema() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick getImageChannelMean() Function The Imagick::getImageChannelMean() function is an inbuilt function in PHP which is used to get the mean and standard deviation of one or more image channels. It returns an associative array containing the keys as "mean" and value as "standardDeviation". Syntax: array Imagick::getImageChannelMean(int 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 getImageChannelRange() Function The Imagick::getImageChannelRange() function is an inbuilt function in PHP which is used to gets the range of channel. Syntax: array Imagick ::getImageChannelRange( $channel ) Parameters: This function accept single parameter $channel which specifies the channel to find image channel range. The defa 2 min read PHP | Imagick getImageChannelDepth() Function The Imagick::getImageChannelDepth() function is an inbuilt function in PHP which is used to get the depth for channel image. Syntax: int Imagick::getImageChannelDepth( $channel ) Parameters: This function accepts a single parameter $channel which specifies the channel constant that is valid for chan 2 min read PHP | Gmagick getimagechanneldepth() Function The Gmagick::getimagechanneldepth() function is an inbuilt function in PHP which is used to return the depth for channel image.Syntax:Â Â int Gmagick::getimagechanneldepth( $channel_type ) Parameters: This function accepts a single parameter $channel_type which holds the channel constant that is vali 2 min read Like