pixelmatix / AnimatedGIFs

MIT License
62 stars 34 forks source link

LZW_MAXBITS is not high enough for some 32x32 GIFs #4

Closed pixelmatix closed 9 years ago

pixelmatix commented 9 years ago

Discovered using this GIF which has a lot of subtle color variations. The GIF plays without crashing, but occasional a few rows at the bottom look corrupted. Debugging showed a lot of instances in lzw_decode() where cursize >= LZW_MAXBITS. Increasing LZW_MAXBITS from 10 to 11 fixed the issue for this GIF at the cost of about 6k of RAM. export-qual1mini

pixelmatix commented 9 years ago

Pinging @CraigLindley - in case you're interested

ghost commented 9 years ago

Yes this was a conscience decision on my part to limit RAM usage. This was necessary for the LightAppliance but probably not for just playing animated GIFS.

pixelmatix commented 9 years ago

Thanks for making it easy to change for my use case!