willz
willz

Reputation: 2050

Is it possible to see/access the frames of an animated gif

I was curious if it were at all possible to load an animated .gif file and in code, see what frames it contains or the number of frames? Is this at all possible in javascript? and if not, is this at all possible with even some kind of image processing library?

Upvotes: 1

Views: 311

Answers (1)

kevin628
kevin628

Reputation: 3526

In Javascript? Likely not. If you could get a hold of the raw bytes in the GIF file, you could write (or maybe find a library) a Javascript implementation for reading the image/frame data in a GIF.

That'd be overkill, unless you're just plain curious if it can be done.

Knowing that, you may want to use a server-side solution to get the number of frames in a GIF.

Upvotes: 1

Related Questions