during engineering of #5040, we found that memory management in the gif loader could be improved, however this would need changes in the GifDecoder library.
-
create a PR for Aircoookie/GifDecoder:
- add return value to decoder.alloc(), for platforms that do not support exceptions. true=success, false=failed
- support a custom "malloc" callback function. This function gets the number of bytes as parameter, and it returns a pointer to the allocated memory. decoder.alloc() then constructs its internal "gif" object inside the provided memory block.
-
once we have support in GifDecoder, integrate WLED internal d_malloc() into image_loader.cpp.