<?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 and images drawing]]></title><description><![CDATA[<p dir="auto">I'm looking for example of loading and drawing BMP or Jpg images on the M5Paper.<br />
It's a bit hard to try to figure it out from the Factory test so if anyone has some shorter example, that will help me a lot.</p>
]]></description><link>https://community.m5stack.com/topic/2824/m5paper-and-images-drawing</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 08:43:49 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2824.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Jan 2021 18:07:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Paper and images drawing on Sat, 30 Jan 2021 15:21:44 GMT]]></title><description><![CDATA[<p dir="auto">As the weather looks really rainy this week end, I'll have plenty things to try.<br />
Thanks all, I'll keep posted my progress.</p>
]]></description><link>https://community.m5stack.com/post/12188</link><guid isPermaLink="true">https://community.m5stack.com/post/12188</guid><dc:creator><![CDATA[TitiMoby]]></dc:creator><pubDate>Sat, 30 Jan 2021 15:21:44 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper and images drawing on Tue, 26 Jan 2021 17:23:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/titimoby" aria-label="Profile: titimoby">@<bdi>titimoby</bdi></a> said in <a href="/post/12022">M5Paper and images drawing</a>:</p>
<blockquote>
<p dir="auto">I did not find definition of supported BMP file format.<br />
Do someone knows this?</p>
</blockquote>
<p dir="auto">I couldn't use the Adafruit bmp images as is, but with a little trial and error, I used Gimp (on a Mac) to convert those Adafruit bmp files to something that the M5Paper would display.</p>
<p dir="auto">First I changed the mode from Indexed to RGB.<br />
<img src="/assets/uploads/files/1611681782898-screen-shot-2021-01-26-at-12.15.52-pm-resized.png" alt="0_1611681531992_Screen Shot 2021-01-26 at 12.15.52 PM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Than I exported as a bmp at 24-bits (8-bit for each RGB).<br />
<img src="/assets/uploads/files/1611681592878-screen-shot-2021-01-26-at-12.14.36-pm.png" alt="0_1611681569148_Screen Shot 2021-01-26 at 12.14.36 PM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">You can find all the original weather icons <a href="https://www.alessioatzeni.com/meteocons/" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> for that Adafruit MagTag weather forecast display. You can download them in PSD, EPS, SVG, etc. format and convert them to bmp,  png, or jpg for use on the M5Paper.</p>
]]></description><link>https://community.m5stack.com/post/12029</link><guid isPermaLink="true">https://community.m5stack.com/post/12029</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Tue, 26 Jan 2021 17:23:06 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper and images drawing on Tue, 26 Jan 2021 16:44:32 GMT]]></title><description><![CDATA[<p dir="auto">I wrote up what I knew in my Eink book but now I have my M5pages I can test it out.</p>
]]></description><link>https://community.m5stack.com/post/12023</link><guid isPermaLink="true">https://community.m5stack.com/post/12023</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 26 Jan 2021 16:44:32 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper and images drawing on Tue, 26 Jan 2021 16:37:38 GMT]]></title><description><![CDATA[<p dir="auto">From a quick look at the source, it supports single-plane, 24 bit, uncompressed BMP files.</p>
<p dir="auto">You should get one of these:</p>
<ul>
<li>error log of "File not found", return value 0</li>
<li>error log of "BMP format not recognized", return value 0</li>
<li>debug log of "Loaded in x ms", return value 1</li>
<li>no log output, return value 1</li>
</ul>
<p dir="auto">If you get the last one, it means the bmp file didn't have the correct header ("BM"), but this doesn't give an error.</p>
]]></description><link>https://community.m5stack.com/post/12040</link><guid isPermaLink="true">https://community.m5stack.com/post/12040</guid><dc:creator><![CDATA[murraypaul]]></dc:creator><pubDate>Tue, 26 Jan 2021 16:37:38 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper and images drawing on Tue, 26 Jan 2021 16:25:07 GMT]]></title><description><![CDATA[<p dir="auto">I did not find definition of supported BMP file format.<br />
Do someone knows this?</p>
]]></description><link>https://community.m5stack.com/post/12022</link><guid isPermaLink="true">https://community.m5stack.com/post/12022</guid><dc:creator><![CDATA[TitiMoby]]></dc:creator><pubDate>Tue, 26 Jan 2021 16:25:07 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper and images drawing on Tue, 26 Jan 2021 11:33:14 GMT]]></title><description><![CDATA[<p dir="auto">So I did some experiment and I was on the right way to do it, except I'm trying to port an example that uses BMP files and those won't be displayed.</p>
<p dir="auto">I downloaded the <a href="https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/example_pic/flower.jpg" target="_blank" rel="noopener noreferrer nofollow ugc">flower</a> from M5Paper examples.<br />
I put it on my SD card, both as /flower.jpg and /bmp/flower2.jpg (I know, bmp is for... bmp files, but I wanted to test file in a folder)<br />
Then I run the code from <a class="plugin-mentions-user plugin-mentions-a" href="/user/world101" aria-label="Profile: world101">@<bdi>world101</bdi></a> just renaming the file I wanted.<br />
This works.</p>
<p dir="auto">I then put my bmp files (coming from an <a href="https://learn.adafruit.com/magtag-weather/project-code" target="_blank" rel="noopener noreferrer nofollow ugc">Adafruit guide</a>) in my SD card, folder is bmp.<br />
I even tried to use a shorter name for the file.<br />
None worked.</p>
<pre><code class="language-#include">
M5EPD_Canvas canvas(&amp;M5.EPD);

void setup()
{
  M5.begin();
  M5.EPD.SetRotation(90);
  M5.EPD.Clear(true);
  //overlay bg on full screen
  canvas.createCanvas(540, 960);
  //canvas.setTextSize(2);
  //jpg must be in 90degree (full screen)

  //image from SD card
  //canvas.drawJpgFile(SD, "/bmp/flower2.jpg"); //put image.jpg on the sdcard before uploading sketch
  //canvas.drawBmpFile(SD, "/bmp/weather_icons_20px.bmp", 0, 0);
  canvas.drawBmpFile(SD, "/bmp/shortname.bmp", 0, 0);

  canvas.pushCanvas(0, 0, UPDATE_MODE_GC16);
  delay(2000);
  //shutdown to save battery
  Serial.println("shutting down now...");
  M5.shutdown();
}

void loop()
{

}
</code></pre>
<p dir="auto">I think I need to dig the documentation to find which precise BMP format is supported.</p>
]]></description><link>https://community.m5stack.com/post/12011</link><guid isPermaLink="true">https://community.m5stack.com/post/12011</guid><dc:creator><![CDATA[TitiMoby]]></dc:creator><pubDate>Tue, 26 Jan 2021 11:33:14 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper and images drawing on Tue, 26 Jan 2021 07:04:51 GMT]]></title><description><![CDATA[<p dir="auto">It looks like what I tried.<br />
I need to isolate the part of my code that is supposed to draw the image.<br />
Maybe there is an issue with the file I use.<br />
Thanks a lot.</p>
]]></description><link>https://community.m5stack.com/post/12000</link><guid isPermaLink="true">https://community.m5stack.com/post/12000</guid><dc:creator><![CDATA[TitiMoby]]></dc:creator><pubDate>Tue, 26 Jan 2021 07:04:51 GMT</pubDate></item><item><title><![CDATA[Reply to M5Paper and images drawing on Mon, 25 Jan 2021 21:42:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/titimoby" aria-label="Profile: titimoby">@<bdi>titimoby</bdi></a></p>
<p dir="auto">Here is a simple sketch for displaying an image from the SD card or from online. With some trial and error, I have found that Grey color space images don't work, but RGB color space images do.</p>
<pre><code>#include &lt;M5EPD.h&gt;

M5EPD_Canvas canvas(&amp;M5.EPD);

void setup()
{
    M5.begin();
    M5.EPD.SetRotation(90);
    M5.EPD.Clear(true);
    //overlay bg on full screen
    canvas.createCanvas(540, 960);
    //canvas.setTextSize(2);
    //jpg must be in 90degree (full screen)

    //image from SD card
    canvas.drawJpgFile(SD, "/image.jpg"); //put image.jpg on the sdcard before uploading sketch

    //image from online source (png or jpg)
    //canvas.drawPngUrl("http/https link to png image");
    //canvas.drawJpgUrl("https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/example_pic/flower.jpg");
    
    //load the scene starting at x0 y0 position
    canvas.pushCanvas(0,0,UPDATE_MODE_GC16);
    delay(2000);
    //shutdown to save battery
    Serial.println("shutting down now...");
    M5.shutdown();
}

void loop()
{ 

}
</code></pre>
]]></description><link>https://community.m5stack.com/post/11988</link><guid isPermaLink="true">https://community.m5stack.com/post/11988</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Mon, 25 Jan 2021 21:42:47 GMT</pubDate></item></channel></rss>