Re: GdkPixbufAnimation get number of frames ?

torben hohn <torbenh gmx de> writes:

> in the current implementation i can not obtain the number of
> frames in a gif animation.
> it always loops.
> so i can not do 
> while( gdk_pixbuf_animation_iter_get_delay_time( iter ) != -1 )
>   put frame into GList and advace iter
> I think there should be a property on the iter which can control the
> loop
> behaviour. (obeying the loop flag on the animation would not work
> for me because then loading a looping animation into a GList would
> cause an infinite loop.

Not really answering your question, but the idea of trying to get all
the frames in an animation by stepping it and recording each frame has
a problem - GdkPixbufAnimation is not frame based. You can have
animation formats with elements that move continuously in time (MNG
allows this, if I'm not mistaken.) In such cases, you could
end up with a huge amount of generated data.

The suggested API addition in:

Would allow getting an array of all the frames in
a GIF or ANI animation.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]