<?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[Working with jpg images]]></title><description><![CDATA[<p dir="auto">The factor demo for the Core2 is very nice.<br />
I found the thread "Lesson 1.2.1. LCD. How to create image array" but that is not what is used in the factory demo.<br />
They use, Disbuff.drawJpg(CoverImage,21301,0,0,240,240,0,0);<br />
The lesson thread uses drawBitmap</p>
<p dir="auto">What I would like to know is how to take a .jpg image, convert it to a C file and use drawJpg to throw it on the LCD.<br />
Is there any info on how to do that ?</p>
<p dir="auto">Thanks</p>
]]></description><link>https://community.m5stack.com/topic/3076/working-with-jpg-images</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Mar 2026 12:34:28 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3076.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Mar 2021 05:36:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Working with jpg images on Mon, 12 Apr 2021 05:29:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/8602">@delchi</a> I take it you are using UIFLOW online.<br />
In that case it just means that the server dropped and crashed due to the amount of people online.</p>
]]></description><link>https://community.m5stack.com/post/13496</link><guid isPermaLink="true">https://community.m5stack.com/post/13496</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 12 Apr 2021 05:29:19 GMT</pubDate></item><item><title><![CDATA[Reply to Working with jpg images on Mon, 12 Apr 2021 01:28:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> And now after an afternoon of a successful PNG image working, it just suddenly stopped, and won't even allow an upload. No error message , no nothing.</p>
<p dir="auto">Frustration wins today. I can't believe how wonky this all is :)</p>
]]></description><link>https://community.m5stack.com/post/13491</link><guid isPermaLink="true">https://community.m5stack.com/post/13491</guid><dc:creator><![CDATA[Delchi]]></dc:creator><pubDate>Mon, 12 Apr 2021 01:28:15 GMT</pubDate></item><item><title><![CDATA[Reply to Working with jpg images on Mon, 12 Apr 2021 00:51:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> Thank you ! I'm using a core 2 and it seems like no one has had an easy time with this. I keep finding odd bugs like loops not working correctly and ghost labels popping up and it's all very frustrating w/out a solid guide. I'll keep an eye out for your book when it covers the core2.</p>
]]></description><link>https://community.m5stack.com/post/13490</link><guid isPermaLink="true">https://community.m5stack.com/post/13490</guid><dc:creator><![CDATA[Delchi]]></dc:creator><pubDate>Mon, 12 Apr 2021 00:51:17 GMT</pubDate></item><item><title><![CDATA[Reply to Working with jpg images on Sun, 11 Apr 2021 19:25:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/8602">@delchi</a> I didn't have any luck with JPGS, so i just used PNG.</p>
]]></description><link>https://community.m5stack.com/post/13488</link><guid isPermaLink="true">https://community.m5stack.com/post/13488</guid><dc:creator><![CDATA[mikemoy]]></dc:creator><pubDate>Sun, 11 Apr 2021 19:25:21 GMT</pubDate></item><item><title><![CDATA[Reply to Working with jpg images on Sun, 11 Apr 2021 18:36:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/8602">@delchi</a> Hi, I am currently rewriting my book at the moment and about to redo the whole image section to make it easy to understand.<br />
jpegs can most defiantly be done in UIFLOW as I have just done it.</p>
<p dir="auto">Images must not be bigger than the screen size.<br />
Images must be indexed.<br />
Images must be compressed,<br />
Images must have all non used colour data removed,<br />
For CoreInk image must be in 1bit mode,<br />
For M5paper images must be in 16bit grayscale,<br />
Images must be no more than 50KB in size.<br />
My current book version found here <a href="https://github.com/Ajb2k3/UIFlowHandbook/blob/master/UIFlowhandbook.pdf" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Ajb2k3/UIFlowHandbook/blob/master/UIFlowhandbook.pdf</a> has the instructions in it.</p>
]]></description><link>https://community.m5stack.com/post/13484</link><guid isPermaLink="true">https://community.m5stack.com/post/13484</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 11 Apr 2021 18:36:22 GMT</pubDate></item><item><title><![CDATA[Reply to Working with jpg images on Sun, 11 Apr 2021 15:32:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> Can you please outline how this is done? I have been unable to do this at all with my core2. With UIFlow it only allows PNG uploads, and with Audrino there is no way to upload the JPG image to the core2. Google searches show 1/2 the time that it can't be done, and that I should upgrade to a FIRE , and 1/2 the time say it's possible but not how to do it.</p>
<p dir="auto">Thanks ,</p>
<ul>
<li>D</li>
</ul>
]]></description><link>https://community.m5stack.com/post/13483</link><guid isPermaLink="true">https://community.m5stack.com/post/13483</guid><dc:creator><![CDATA[Delchi]]></dc:creator><pubDate>Sun, 11 Apr 2021 15:32:00 GMT</pubDate></item><item><title><![CDATA[Reply to Working with jpg images on Sun, 11 Apr 2021 07:09:25 GMT]]></title><description><![CDATA[<p dir="auto">Could you please outline how this is done? I've been trying for days with no luck. It seems only PNG's are accepted , and the ones I resize look pixelated and horrible.</p>
<p dir="auto">Thanks ,</p>
]]></description><link>https://community.m5stack.com/post/13480</link><guid isPermaLink="true">https://community.m5stack.com/post/13480</guid><dc:creator><![CDATA[Delchi]]></dc:creator><pubDate>Sun, 11 Apr 2021 07:09:25 GMT</pubDate></item><item><title><![CDATA[Reply to Working with jpg images on Sat, 13 Mar 2021 16:18:09 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for the detailed explanation.<br />
I wound up using "Bin2C" from <a href="http://segger.com" target="_blank" rel="noopener noreferrer nofollow ugc">segger.com</a> because I am a windows guy ;-)<br />
<a href="https://www.segger.com/free-utilities/bin2c/#using-bin2c" target="_blank" rel="noopener noreferrer nofollow ugc">Bin2C</a></p>
<p dir="auto">Got it working now thanks.</p>
]]></description><link>https://community.m5stack.com/post/12977</link><guid isPermaLink="true">https://community.m5stack.com/post/12977</guid><dc:creator><![CDATA[mikemoy]]></dc:creator><pubDate>Sat, 13 Mar 2021 16:18:09 GMT</pubDate></item><item><title><![CDATA[Reply to Working with jpg images on Sat, 13 Mar 2021 10:34:36 GMT]]></title><description><![CDATA[<p dir="auto">I have a M5Paper, not a Core2, but the APIs look very similar.<br />
You can use something like bin2header (<a href="https://github.com/AntumDeluge/bin2header" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/AntumDeluge/bin2header</a>) to convert your jpg file to a C header file and include that in your project. It will start with something like:</p>
<pre><code>static const unsigned char my_file_name_jpg[] = {...
</code></pre>
<p dir="auto">You can then use the memory buffer form of drawJpg:</p>
<pre><code>      void drawJpg(const uint8_t *jpg_data, size_t jpg_len, uint16_t x = 0,
                  uint16_t y = 0, uint16_t maxWidth = 0, uint16_t maxHeight = 0,
                  uint16_t offX = 0, uint16_t offY = 0,
                  jpeg_div_t scale = JPEG_DIV_NONE);
</code></pre>
<p dir="auto">Like this:</p>
<pre><code>drawJpg(my_file_name_jpg,sizeof(my_file_name_jpg),x,y,...)
</code></pre>
<p dir="auto">(As the other poster said, this might not be the best way of doing it, but it is available.)</p>
]]></description><link>https://community.m5stack.com/post/12975</link><guid isPermaLink="true">https://community.m5stack.com/post/12975</guid><dc:creator><![CDATA[murraypaul]]></dc:creator><pubDate>Sat, 13 Mar 2021 10:34:36 GMT</pubDate></item><item><title><![CDATA[Reply to Working with jpg images on Sat, 13 Mar 2021 08:26:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/147">@mikemoy</a> You don't need to, you can save jpgs to the core2 and load them directly.<br />
btw the lesson was written for the core1 a long time ago.</p>
]]></description><link>https://community.m5stack.com/post/12966</link><guid isPermaLink="true">https://community.m5stack.com/post/12966</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 13 Mar 2021 08:26:48 GMT</pubDate></item></channel></rss>