pixelmatix / AnimatedGIFs

MIT License
62 stars 34 forks source link

Improve decoding of GIFs larger than max size? #15

Open embedded-creations opened 6 years ago

embedded-creations commented 6 years ago

It appears that a non-interlaced 64x64 GIF can be decoded by AnimatedGIFs set with a smaller max size (definitely 64x32, possibly 32x32). Interlaced GIFs have issues. Can the interlaced code be improved to throw out the extra pixels in a larger GIF?

marcmerlin commented 6 years ago

So, when I display on neomatrix, decoding of a gif bigger than my display area works fine, and then I have this offset to tell it what part of it to display: https://github.com/marcmerlin/AnimatedGIFs/blob/master/neomatrix_config.h#L87 Sure, a bit of CPU time is used to decode more GIF surface than can be displayed, but compared to the 36ms taken by a 1024 neopixel screen redraw, that CPU time doesn't seem that important.