Imlib2はgifアニメに対応していないのか
Image::Imlib2 save error: Unknown error at test.pl line 6.
みたいに怒られるんだけどなんでかなとしらべてみたらgifアニメに未対応とか。
Image::Infoで調べる
my $image_info = image_info( $imagefile ); print 'GIF ANIME' if($image_info->{GIF_Loop} eq 'forever');
Both GIF87a and GIF89a are supported and the version number is found as GIF_Version for the first image. GIF files can contain multiple images, and information for all images will be returned if image_info() is called in list context. The Netscape-2.0 extention to loop animation sequences is represented by the GIF_Loop key for the first image. The value is either "forever" or a number indicating loop count.