[magick-developers] Puzzlement over return code from Read method in perlmagick

Niall O Broin niall at linux.ie
Sat Jul 7 17:47:24 PDT 2007


I recently had to revisit some code using perlmagick where I have  
something like:

if ($rc = $image->Read("$filename")) {
     log_error "IM error reading $filename - $rc";
}

and sure enough, if I look in the logs for "IM error reading" I see  
some error messages such as corrupt JPEGs etc.

Now, this seems to correspond nicely with what's described at

http://www.imagemagick.org/script/perl-magick.php#exceptions

However, in the same page, earlier, we see at

http://www.imagemagick.org/script/perl-magick.php#read

that the return value of Read is given as "the number of images read"

Presumably that section of the page needs fixing, or am I missing  
something?



Kindest regards,



Niall  O Broin




More information about the Magick-developers mailing list