Skip to content

How do you get the duration of a GIF? #1264

Answered by natanfudge
natanfudge asked this question in Q&A
Discussion options

You must be logged in to vote

Using @colinrtwhite advice and the Metadata Extractor Library, I've implemented this feature. For those looking for the same thing, I've posted a full gist of the code: https://gist.github.com/natanfudge/709c6a86097da4162fa47074e632317b.

Note it does use some reflection to access internal Coil classes, it would be nice if you could find an alternative!

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@natanfudge
Comment options

@colinrtwhite
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by natanfudge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants