<?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[What is JPEG_DIV_NONE?]]></title><description><![CDATA[<p dir="auto">From the documentation:</p>
<p dir="auto">bool drawJpg(const uint8_t *jpg_data, size_t jpg_len, uint16_t x = 0,<br />
uint16_t y = 0, uint16_t maxWidth = 0, uint16_t maxHeight = 0,<br />
uint16_t offX = 0, uint16_t offY = 0,<br />
jpeg_div_t scale = JPEG_DIV_NONE);</p>
<p dir="auto">What are all of these options, especially JPEG_DIV_NONE?</p>
<p dir="auto">canvas.drawJpgFile(SD, "/WFH.JPEG", 0, 0, 0, 0, 0, 0, "JPEG_DIV_NONE");</p>
<p dir="auto">Can someone help me with this line of code? I want to have a jpg image show in a specific location on the canvas.</p>
]]></description><link>https://community.m5stack.com/topic/4414/what-is-jpeg_div_none</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 23:34:17 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4414.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 02 Jul 2022 00:48:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to What is JPEG_DIV_NONE? on Tue, 05 Nov 2024 15:02:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> Had the same question and here the answer:</p>
<pre><code>jpeg_div_t scale = JPEG_DIV_2;
// JPEG_DIV_NONE,  --&gt; no scale
// JPEG_DIV_2,    --&gt; half the size
// JPEG_DIV_4,
// JPEG_DIV_8,
// JPEG_DIV_MAX

 M5.Lcd.drawJpgFile(SD, filename.c_str(), 0, 0, 320, 240, 0,0, scale);
</code></pre>
]]></description><link>https://community.m5stack.com/post/26958</link><guid isPermaLink="true">https://community.m5stack.com/post/26958</guid><dc:creator><![CDATA[PeterO]]></dc:creator><pubDate>Tue, 05 Nov 2024 15:02:28 GMT</pubDate></item><item><title><![CDATA[Reply to What is JPEG_DIV_NONE? on Sun, 03 Jul 2022 07:04:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jterrell" aria-label="Profile: jterrell">@<bdi>jterrell</bdi></a> You have to bare with me as I just woke up but I believe the options are as follows:</p>
<p dir="auto">canvas.drawJpgFile(File name and location, X Position, Y Position, Width, Height, X offset, Y offset, "Jpeg Scaling");</p>
<p dir="auto">Maxheight limits the visible size of the image setting to 0 means no limit<br />
jpeg_div_t scale = JPEG_DIV_NONE is used to alter the size that the image is show for example if you want the image to be shown smaller then what it was downloaded, set it to<br />
<code>jpeg_div_t scale = JPEG_DIV_50 </code><br />
if you want it bigger set it to<br />
<code>jpeg_div_t scale = JPEG_DIV_150 </code></p>
<p dir="auto">Its similar to the issue I found in this guide <a href="https://www.hackster.io/AJB2K3/lvgl-forum-data-display-061a3c" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.hackster.io/AJB2K3/lvgl-forum-data-display-061a3c</a></p>
<p dir="auto">but Im not sure if it should be<br />
<code>jpeg_div_t scale = JPEG_DIV_50 </code><br />
or<br />
<code>jpeg_div_t scale = JPEG_DIV_(50) </code></p>
<p dir="auto">I don't work in Arduino so not positive here.</p>
]]></description><link>https://community.m5stack.com/post/17890</link><guid isPermaLink="true">https://community.m5stack.com/post/17890</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 03 Jul 2022 07:04:23 GMT</pubDate></item></channel></rss>