Search found 2 matches

by dams
2013-10-27T06:56:11-07:00
Forum: Developers
Topic: php imagemagick statistics usage
Replies: 3
Views: 6064

Re: php imagemagick statistics usage

Here is my code:

function doIt($file) {

$im = new Imagick( $file );
// resize by 200 width and keep the ratio
$stats = $im->getImageChannelStatistics();

// Print Statistics
// ---------------------------------------------
$maxima = $stats[imagick::CHANNEL_RED]['maxima'];

$lum_i ...
by dams
2013-10-27T01:21:32-07:00
Forum: Developers
Topic: php imagemagick statistics usage
Replies: 3
Views: 6064

php imagemagick statistics usage

Hello

I'm trying to compute the average brightness of an image using Imagemagick's getImageChannelStatistics function. I will then use modulateImage to decrease the brightness if it reaches a given threshold.

array Imagick::getImageChannelStatistics ( void )

1st question: The returned mean ...