in reply to weird GIF problem

It looks like binmode solved your problem, but one other gif related problem can produce similar symptoms, and you might want to look out for it. If you open an animated gif, that has been highly optimized, the separate images can look corrupted, unless they were extracted with a program that understands the optimizations. IIRC, it's called Frame Optimization, and successive images only show the difference between frames...much like digital tv does now. One of the ways you can filter out animated gifs, from regular gifs, is in perldoc Imager::Files. I think you can try the read_multi method, and see if you get more than one image. There may be a better way.

I'm not really a human, but I play one on earth Remember How Lucky You Are