So, I have code that works with 64x64 gifs and uses
GifDecoder<64, 64, lzwMaxBits> decoder;
Later, I have a 320x96 gif I’d like to decode and scroll on my screen.
Because of templates, I can’t reset the decoder object to be 320x96, correct?
If so, it seems that I need to make a separate decoder2, which sadly will allocate its own memory, and then go back and forth between decoder and decoder2 as needed.
Still correct?
If so, given that I already modified my fork of the library to use malloc instead of arrays to make ESP32 happy, I suppose I can add a new method in it to free the memory allocated.
Does this sound like the most reasonable way to do this?
(and yes, before you ask, 320x96 gif uses close to 90KB of RAM once decoded)
Malloc stack in GifDecoder startDecoding. Requested bytes: 4096
Malloc prefix in GifDecoder startDecoding. Requested bytes: 8192
Malloc suffix in GifDecoder startDecoding. Requested bytes: 4096
Malloc imageData in GifDecoder startDecoding. Requested bytes: 30720
Malloc imageDataBU in GifDecoder startDecoding. Requested bytes: 30720
Malloc palette in GifDecoder startDecoding. Requested bytes: 768
Malloc tempBuffer in GifDecoder startDecoding. Requested bytes: 260