my $picref = image_info($filename); my $color_type=$picref->{color_type};