interlaced GIF images are saved as 4 separate images
- containing every eighth line of the image (1/8 of the size)
- containing each missing fourth line of the image (1/8 of the size)
- containing any missing even line of the image (1/4 of the size)
- containing each odd line of the image (1/2 size)
This is done so that the image can be seen when downloading via a slow Internet connection ... an increase in detail with each new fragment ...
So, if your image looks like 4 very similar images, then the result will be OK, you simply decode it incorrectly, or GIF did not set the interlace flag.
If your file no longer contains animation frames, you are out of luck, but if they are, and not rendering, then check that the end of the GIF file is not set in place or does not check the flags that they could ruin ... you tried another GIF viewer (some of them are erroneous)
[Edit1] after decoding your gif
You have GIF89a , and you are missing interlaced flags in each frame. Thus, the image alternates correctly, but the viewer believes that it is not interwoven at all ... You need to mark the interlaced flag in each title of the frame.
struct _img // this is image frame header { // Logical Image Descriptor BYTE Separator; /* Image Descriptor identifier 0x2C */ WORD x0; /* X position of image on the display */ WORD y0; /* Y position of image on the display */ WORD xs; /* Width of the image in pixels */ WORD ys; /* Height of the image in pixels */ BYTE Packed; /* Image and Color Table Data Information */ } img; img.Packed|=64; // this will set the interlaced flag
To do this, you need to decode / copy the GIF, which is not as simple as it seems.
cm
Here is the result of the frames copy + deinterlace + interlaced encoding (skipping control / information / auxiliary channels ...)

source share