M5GFX
M5GFX copied to clipboard
Drawing images from URL (e.g. drawPngUrl) does not work if response is chunked
Example: this png is returned with a Transfer-Encoding: chunked header and M5GFX can't render it with drawPngUrl.
This happens because each chunk in the tcp stream has a chunk-header (chunkLength\r\n) and a trailer (\r\n), but the drawImg##Url function does not take this into account so it thinks the stream is not a valid PNG and cannot render it. M5GFX should do something like https://github.com/espressif/arduino-esp32/blob/ee8931d151665ffc6bb52e3edb9509a6d8e5c401/libraries/HTTPClient/src/HTTPClient.cpp#L885-L934 to make sure images that get sent with chunks can be rendered.