lc.
lc.

Reputation: 116458

How to extract frame timing information from animated GIF?

This is brought on by a previous question. Apparently ImageList doesn't support animated GIFs, so I'm stuck animating it myself.

I know how to extract the frames, but does anyone know how to extract the frame timing information from an animated GIF?

Upvotes: 2

Views: 1480

Answers (1)

Noldorin
Noldorin

Reputation: 147290

You can get the duration of the current frame (having called SelectActiveFrame), using a call to Image.GetPropertyItem, as such:

var duration = image.GetPropertyItem(0x5100).Value;

I believe the duration value is measured in 1/100ths of seconds.

Upvotes: 2

Related Questions