Skip to content

Decompress GIF frames on demand

This branch solves the memory explosion loading large GIFs as described in #101 (closed). This requires !28 (merged) as it relies on the test cases to prove the updated code continues to work.

I ended up implementing a new LZW decoder after I tried the following:

  • Keeping the existing LZW decoder code - it had too much spaghetti to easily relocate it.
  • Use the LZW decoding code from nsgif. It didn't support progressive loading and the more I looked into it the code wasn't of great quality.
Edited by Robert Ancell

Merge request reports