EvaluateImages()

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
User avatar
rmabry
Posts: 148
Joined: 2004-04-13T11:25:27-07:00

EvaluateImages()

Post by rmabry »

I think I'm doing what I'm told in the doc, but I'm getting an error. Doc says,
The EvaluateImages() method applies an arithmetic, logical or relational expression to a set of images. For example,

$p = $image->EvaluateImages('mean');

averages all the images associated with object $image.
But I get an error in the following script:

Code: Select all

use Image::Magick;
$images = new Image::Magick;

$notok = $images->Read("rose:", "rose:");  
die "on roses: $notok" if $notok;

printf("\$images contains %d rosey images\n", scalar(@$images));

$image = $images->EvaluateImages('mean');

print "I never get here and I don't even get a warning.\n";

$images->Write("rosey.png");
$image->Write("rosey-mean.png");
Instead it dies without the warning with the following output:
$images contains 2 rosey images
Usage: Image::Magick::Q16HDRI::EvaluateImages(ref) at EvaluateImagesTest.plx line 9.
Is it me? I'm using ImageMagick 7.0.7-15 Q16 x86_64 2018-01-17 on Centos 6.9 with perl v5.10.1.

Rick
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: EvaluateImages()

Post by magick »

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.
Post Reply