Mbee Posted January 25, 2018 Share Posted January 25, 2018 I'm looking for a way to determine if a file with the .GIF extension is a still image or an animated GIF. There are several UDFs here to display or create an animated GIF, but I've been unable to find a way to tell me in a GIF file is animated in the first place. There are difficult ways to do this, such as forcing all users to install ImageMagick so that my scripts can ask it, but that way obviously sucketh. I found a UDF to return extended file info, but it doesn't return a frame count or any other way to tell a still GIF from an animated one. Any ideas, folks? Thanks. Link to comment Share on other sites More sharing options...
Popular Post Subz Posted January 26, 2018 Popular Post Share Posted January 26, 2018 ConsoleWrite(_GifAnimated(@ScriptDir & "\filename.gif") & @CRLF) Func _GifAnimated($_sGifFileName) If FileExists($_sGifFileName) = 0 Then Return False Local $objImage = ObjCreate("WIA.ImageFile") $objImage.LoadFile($_sGifFileName) Return $objImage.IsAnimated EndFunc Mbee, Xandy, badcoder123 and 2 others 5 Link to comment Share on other sites More sharing options...
Mbee Posted January 26, 2018 Author Share Posted January 26, 2018 19 hours ago, Subz said: ConsoleWrite(_GifAnimated(@ScriptDir & "\filename.gif") & @CRLF) Func _GifAnimated($_sGifFileName) If FileExists($_sGifFileName) = 0 Then Return False Local $objImage = ObjCreate("WIA.ImageFile") $objImage.LoadFile($_sGifFileName) Return $objImage.IsAnimated EndFunc Wow! Thank you for your extremely valuable contribution! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now