use Image::ParseGIF; $gif = new Image::ParseGIF ("image.gif") or die "failed to parse: $@\n"; print "Multiple parts\n" if $gif->parts > 1;