PerlMagick Incorrectly Identifies Colorspace
Posted: 2011-07-20T05:54:31-07:00
Hi,
I'm using the PerlMagick Get() method to identify image attributes for a database with millions of images in it.
I noticed that colorspace is not correct coming from the PerlMagick API, but is correct when using /usr/bin/identify.
Here's how:
$VAR1 = 'RGB';
$VAR2 = 'ImageMagick 6.2.8 10/20/10 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html';
/usr/bin/identify -verbose g001.jpg | grep Colorspace
Colorspace: Gray
JPEG-Colorspace: 1
$/usr/bin/identify --version
Version: Image 6.2.8 10/20/10 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
Can anyone tell me if this bug has been fixed in a newer version of PM?
(This JPG was created using ImageMagick, I don't have a URL for it yet - I should tomorrow)
Thanks,
-A
I'm using the PerlMagick Get() method to identify image attributes for a database with millions of images in it.
I noticed that colorspace is not correct coming from the PerlMagick API, but is correct when using /usr/bin/identify.
Here's how:
Code: Select all
use Image::Magick;
use Data::Dumper;
my $i = Image::Magick->new;
$i->read($ARGV[0]);
my ($colorspace, $version) = $i->Get('colorspace', 'version');
print Dumper($colorspace, $version);
$VAR2 = 'ImageMagick 6.2.8 10/20/10 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html';
/usr/bin/identify -verbose g001.jpg | grep Colorspace
Colorspace: Gray
JPEG-Colorspace: 1
$/usr/bin/identify --version
Version: Image 6.2.8 10/20/10 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
Can anyone tell me if this bug has been fixed in a newer version of PM?
(This JPG was created using ImageMagick, I don't have a URL for it yet - I should tomorrow)
Thanks,
-A