kikuchan / pngle

Pngle - PNG Loader for Embedding
MIT License
109 stars 20 forks source link

Memory consumption in one block #7

Open ferbar opened 1 year ago

ferbar commented 1 year ago

In my ESP32 project there is about 70kB free ram with maxalloc 40kB, so too small for a complete _pngle_t variable. So I changed inflator to *inflator in https://github.com/kikuchan/pngle/blob/master/src/pngle.c#L120 and added a malloc +free.

i could file a PR with my changes and #ifdef PNGLE_SPLIT_VAR or so...

the same could be done for lz_buf probably. Then the needed maxalloc block would be reduced to 32kB

Thanks!