wcout / fltk-gif-animation

FLTK Animated GIF display

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot load the attached animated GIF image

fire-eggs opened this issue · comments

As alluded to in issue #2, the attached animated GIF image cannot be loaded by Fl_Anim_GIF_Image.

0_bfKvMYVWUpbBtXM5.zip

Fails attempting to load the first frame. The following test in gif_loadh.h, _GIF_LoadFrame fails:

    if ((ctbl = (1L << ctsz)) != (mask & _GIF_SWAP(*(GIF_H*)(*buff + 1))))
        return -2; /** initial code is not equal to min LZW size **/

Disabling that test allows the GIF to load and display. I don't know what the possible implications are of not using that test.

There shall be no implications whatsoever, I was just trying to be pedantic about the standard when adding this check.

commented

I have now removed this check in my copy of gif_load.h.
@hidefromkgb: Thanks for clarifying. I wouldn’t have dared to change anything otherwise.

commented

Fixed in current repository. Thanks for the analysis!