<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5Paper: How to display large jpg image from web (or download it to SD card)]]></title><description><![CDATA[<p dir="auto">Hello!</p>
<p dir="auto">I am new to m5stack, arduino/micropython and ESP32 development overall, and I was wondering if anybody here could help me and give me advice what would be best way to go about displaying larger jpg images (~1MB) directly from web on m5paper.</p>
<p dir="auto">I was able to draw small example image "flower.jpg" using<br />
<code>canvas.drawJpgUrl("https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/example_pic/flower.jpg");</code></p>
<p dir="auto">But I understand I cant draw larger images this way, directly from the web, so I was thinking I would download the image to SD card first and then display it (since that works for large images)</p>
<p dir="auto">Any ideas if there is a better way to do this and what I should look into?</p>
<p dir="auto">Thank you!</p>
<p dir="auto">PS: I found that maybe I could modify this example to download images, but it is a bit complicated for me to understand everything:<br />
<a href="https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/examples/StreamHttpClient/StreamHttpClient.ino" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/examples/StreamHttpClient/StreamHttpClient.ino</a></p>
]]></description><link>https://community.m5stack.com/topic/2986/m5paper-how-to-display-large-jpg-image-from-web-or-download-it-to-sd-card</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 20:13:36 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2986.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Feb 2021 08:57:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Paper: How to display large jpg image from web (or download it to SD card) on Mon, 22 Feb 2021 17:17:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> Thanks Felix, I tested different urls with several jpg images and it is really working.</p>
<p dir="auto">I was probably testing either images with wrong format or simply didn't wait long enough until the image is drawn. And not sure why, I was under impression that images need to be smaller than 50KB ... my bad.</p>
<p dir="auto">Thanks again, you saved me a lot of headache :)</p>
]]></description><link>https://community.m5stack.com/post/12613</link><guid isPermaLink="true">https://community.m5stack.com/post/12613</guid><dc:creator><![CDATA[doubleness]]></dc:creator><pubDate>Mon, 22 Feb 2021 17:17:05 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper: How to display large jpg image from web (or download it to SD card) on Mon, 22 Feb 2021 10:14:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/doubleness" aria-label="Profile: doubleness">@<bdi>doubleness</bdi></a></p>
<p dir="auto">M5Paper has 8MB of PSRAM on board of which 4MB can be used at the time. (The limitation is ESP32 which only can map 4MB at the time).<br />
And <code>canvas.drawJpgUrl()</code> already makes use of PSRAM by calling <code>ps_malloc()</code>:</p>
<pre><code>    uint8_t *p = (uint8_t*)ps_malloc(size);
    if(p == NULL)
    {
        log_e("Memory overflow.");
        return 0;
    }
</code></pre>
<p dir="auto">In my test I was able to directly download and display jpgs up to about 4MB. (No SD card involved.)</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/12604</link><guid isPermaLink="true">https://community.m5stack.com/post/12604</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 22 Feb 2021 10:14:19 GMT</pubDate></item></channel></rss>