Page 1 of 1

GetAttribute shows type as 'Palette' but identify shows as 'Bilevel.

Posted: 2018-06-18T13:38:52-07:00
by bobbintb
I have a script that works based on image type.

Code: Select all

my $imageType = $image->GetAttribute('type');
Then I have a couple if statements:

Code: Select all

if($imageType eq 'Bilevel')
if($imageType eq 'Grayscale')
if($imageType eq 'TrueColor')
and an else to print out the file and image type if it doesn't match any of those three. However, I am getting errors in my logs for files because they are of type 'Palette'. When I use identify on the image the type is 'Bilevel'. I did not see 'Palette' anywhere in the identify output. I'm not sure what is going on. I am using ImageMagick 7.0.7-28 q16. Any ideas?