Is this expected, or a bug?
Posted: 2009-04-19T15:34:29-07:00
Hi, just wondering if this behaviour is expected? If I ping the image it always says it's in Greyscale, even though the file is not. If I read the entire image, it correctly returns false.
I get the same true/false result with any RGB file I try.
Interestingly, it works as expected with a much older version of ImageMagick,
I get the same true/false result with any RGB file I try.
Code: Select all
irb(main):001:0> require 'RMagick'
=> true
irb(main):002:0> i = Magick::Image.ping('test.jpg').first
=> test.jpg JPEG 1600x1084 1600x1084+0+0 DirectClass 8-bit 485kb
irb(main):003:0> i.grey?
=> true
irb(main):004:0> i.colorspace
=> RGBColorspace=1
irb(main):005:0> i = Magick::Image.read('test.jpg').first
i=> test.jpg JPEG 1600x1084 1600x1084+0+0 DirectClass 8-bit 485kb
irb(main):006:0> i.grey?
=> false
irb(main):007:0> Magick::Version
=> "RMagick 2.9.1"
irb(main):008:0> Magick::Magick_version
=> "ImageMagick 6.5.1-1 2009-04-20 Q16 http://www.imagemagick.org"
Code: Select all
irb(main):001:0> require 'RMagick'
=> true
irb(main):002:0> puts Magick::Version, Magick::Magick_version
RMagick 2.3.0
ImageMagick 6.3.7 03/31/08 Q16 http://www.imagemagick.org
=> nil
irb(main):003:0> Magick::Image.ping('test.jpg').first.grey?
=> false
irb(main):004:0> Magick::Image.read('test.jpg').first.grey?
=> false