Puzzlement over return code from Read method in perlmagick

Niall O Broin <[email protected]>
Newsgroups gmane.comp.video.image-magick.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.