Problems reading animated gif

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, xnview

Post Reply
Alessandro

Problems reading animated gif

Post by Alessandro » Mon Oct 10, 2005 5:03 pm

Hi

I tryed to open an animated gif but info.NumberOfImages returns always 1 so I dunno how many frames are stored into it and about the framerate... how do I know the speed of the animation? maybe for animated gif is there a standard I don't know of?

Best regards.

User avatar
xnview
Author of XnView
Posts: 33337
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Problems reading animated gif

Post by xnview » Mon Oct 10, 2005 6:58 pm

Alessandro wrote:I tryed to open an animated gif but info.NumberOfImages returns always 1 so I dunno how many frames are stored into it and about the framerate... how do I know the speed of the animation? maybe for animated gif is there a standard I don't know of?
Currrently not possible to know the frame rate. And for gif animated, there is a little problem, try gflLoadBitmap and you'll have a NumberOfImages not 1
Pierre.

voja21
Posts: 2
Joined: Thu Nov 30, 2006 10:37 am
Location: Belgrade

How to extract other frames?

Post by voja21 » Fri Dec 08, 2006 4:26 pm

When I convert gif to some other format, I got only first frame. How to access (and save) other?

User avatar
xnview
Author of XnView
Posts: 33337
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to extract other frames?

Post by xnview » Tue Dec 12, 2006 1:19 pm

voja21 wrote:When I convert gif to some other format, I got only first frame. How to access (and save) other?
You have GFL_LOAD_PARAMS::ImageWanted
Pierre.

lazyeugene
Posts: 16
Joined: Sat Oct 03, 2009 10:17 am
Location: Ukraine

Re: Problems reading animated gif

Post by lazyeugene » Sat Nov 05, 2011 12:33 pm

Is there any method to determine value of "Background Color Index" for whole gif and "Disposal Method" and "Delay" fields for pictures in animated gif? Pictures itself reads correctly, but I can't find out how to get this fields :(

lazyeugene
Posts: 16
Joined: Sat Oct 03, 2009 10:17 am
Location: Ukraine

Re: Problems reading animated gif

Post by lazyeugene » Sat Nov 05, 2011 4:53 pm

And there is another problem. I'm trying to load animated gif with about a three hundreds of frames. It is not quite big - about 60k, but it loads several seconds. As i call to load evety frame individually, the library, as I suppose, must again and again load and decode file from the beginning. Maybe there is wokaround?

User avatar
xnview
Author of XnView
Posts: 33337
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Problems reading animated gif

Post by xnview » Mon Nov 07, 2011 9:03 am

lazyeugene wrote:Is there any method to determine value of "Background Color Index" for whole gif and "Disposal Method" and "Delay" fields for pictures in animated gif? Pictures itself reads correctly, but I can't find out how to get this fields :(
No sorry
lazyeugene wrote:And there is another problem. I'm trying to load animated gif with about a three hundreds of frames. It is not quite big - about 60k, but it loads several seconds. As i call to load evety frame individually, the library, as I suppose, must again and again load and decode file from the beginning. Maybe there is wokaround?
The problem is that GFL need to decompress all previous frames...
Pierre.

lazyeugene
Posts: 16
Joined: Sat Oct 03, 2009 10:17 am
Location: Ukraine

Re: Problems reading animated gif

Post by lazyeugene » Mon Nov 07, 2011 4:58 pm

xnview wrote:
lazyeugene wrote:Is there any method to determine value of "Background Color Index" for whole gif and "Disposal Method" and "Delay" fields for pictures in animated gif? Pictures itself reads correctly, but I can't find out how to get this fields :(
No sorry
But adding this fields to GFL_BITMAP structure should not be a problem, isn't it?
xnview wrote:
lazyeugene wrote:And there is another problem. I'm trying to load animated gif with about a three hundreds of frames. It is not quite big - about 60k, but it loads several seconds. As i call to load evety frame individually, the library, as I suppose, must again and again load and decode file from the beginning. Maybe there is wokaround?
The problem is that GFL need to decompress all previous frames...
Maybe you can register some kind of GFL_BITMAP array[]? Or save a pointer to next picture (offset from the begining of file) in GFL_BITMAP structure and accept it in load bitmap requests?

This is just a few fields, but without them it is almost unreal to load animated gif's. Please...

User avatar
xnview
Author of XnView
Posts: 33337
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Problems reading animated gif

Post by xnview » Tue Nov 08, 2011 12:03 pm

No, the better way is to add a function to load all bitmap from animated file
Pierre.

lazyeugene
Posts: 16
Joined: Sat Oct 03, 2009 10:17 am
Location: Ukraine

Re: Problems reading animated gif

Post by lazyeugene » Thu Nov 10, 2011 8:25 pm

I'll be waiting for a new version, thank you.

Post Reply