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

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
bobbintb
Posts: 3
Joined: 2018-03-30T13:06:42-07:00
Authentication code: 1152

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

Post 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?
Post Reply