Subject: | Invalid warning in Image::Info::PNG |
In the PNG parser, Image::Info::PNG, at around line 141 is the following.
elsif ($type eq "zTXt" && $have_zlib) {
my($key, $val) = split(/\0/, $data, 2);
my($method,$ctext) = split(//, $val, 2);
if ($method == 0) {
$info->push_info(0, $key,
Compress::Zlib::uncompress($ctext));
} else {
$info->push_info(0, "Chunk-$type" => $data);
}
}
From this, I am getting warnings.
Argument "\0" isn't numeric in numeric eq (==) at
/usr/local/share/perl/5.8.8/Image/Info/PNG.pm line 141.
at /usr/local/share/perl/5.8.8/Image/Info/PNG.pm line 141
Image::Info::PNG::process_file('Image::Info::Result=ARRAY(0xa5c0b80)',
'GLOB(0xa5ebff0)', 'HASH(0x8e8932c)') called at
/usr/local/share/perl/5.8.8/Image/Info.pm line 63
eval {...} called at /usr/local/share/perl/5.8.8/Image/Info.pm
line 47
Image::Info::image_info('SCALAR(0xa1ddfd8)') called at
lib/LocalVision/Image.pm line 33
So I think we need to change this...
if ($method == 0) {
... to this ...
if ($method eq "\0" or $method == 0) {