1

I am looking for a way to "find" animated GIFs so I can remove them from a folder.

This must work on Windows 7 or Windows XP.


Edit: I am looking to distinguish between animated and regular GIFs. If I could select all GIFs that might be ok as then I could sort by size, but some GIFs are saved with the extension .jpg! That is why I think I probably need a special Image viewer program.

Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345
James Cooper
  • 417
  • 1
  • 3
  • 12

1 Answers1

1

You can use ImageMagick to get the number of frames in a GIF like this:

identify -format "%[scene]\n" YourImage.gif[-1]
identify -format "%[scene]\n" YourImage.jpeg[-1]

It actually gets the frame number of the last frame, so if the image has 37 frames, it will tell you that frame 36 (starting at zero) is the last. So, an animated GIF will give an output of 1 or more since it has multiple frames.

This also works, if the image is mis-named by using a different name suffix. ImageMagick isn't fooled by this, it will still discover that in reality it is a GIF. If it is a standard JPEG, or a GIF with only 1 frame it will return 0.

ImageMagick is free and available for OSX, Linux and Windows - here.

Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432