Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawing images from URL (e.g. drawPngUrl) does not work if response is chunked #103

Open
Lazyuki opened this issue Oct 18, 2024 · 0 comments

Comments

@Lazyuki
Copy link

Lazyuki commented Oct 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant