<?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[Cardputer and drawJpgFile]]></title><description><![CDATA[<p dir="auto">Hello everybody.<br />
I have a problem that is giving me a headache. I purchased an M5Cardputer and I'm trying to get it to display a JPG image on the screen by reading from an SD card, using the M5Cardputer.Display.drawJpgFile function, but my code doesn't compile, returning this error.</p>
<pre><code>In file included from .pio/libdeps/m5stack-stamps3/M5GFX/src/M5GFX.h:22,
                 from .pio/libdeps/m5stack-stamps3/M5Unified/src/M5Unified.hpp:19,
                 from .pio/libdeps/m5stack-stamps3/M5Unified/src/M5Unified.h:5,
                 from .pio/libdeps/m5stack-stamps3/M5Cardputer/src/M5Cardputer.h:4,
                 from src/main.cpp:1:
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/LGFXBase.hpp: In instantiation of 'bool lgfx::v1::LGFXBase::drawJpgFile(T&amp;, const char*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, float, float, lgfx::v1::datum::datum_t) [with T = fs::SDFS; int32_
t = int; lgfx::v1::datum::datum_t = lgfx::v1::textdatum::textdatum_t]':
src/main.cpp:19:46:   required from here
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/LGFXBase.hpp:888:23: error: cannot declare variable 'file' to be of abstract type 'lgfx::v1::DataWrapperT&lt;fs::SDFS&gt;'
       DataWrapperT&lt;T&gt; file ( &amp;fs ); \
                       ^~~~
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/LGFXBase.hpp:895:5: note: in expansion of macro 'LGFX_FUNCTION_GENERATOR'
     LGFX_FUNCTION_GENERATOR(drawJpg, draw_jpg)
     ^~~~~~~~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/platforms/esp32/../esp32/common.hpp:20,
                 from .pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/platforms/esp32/../common.hpp:22,
                 from .pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/platforms/esp32/Bus_SPI.hpp:57,
                 from .pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/platforms/device.hpp:42,
                 from .pio/libdeps/m5stack-stamps3/M5GFX/src/M5GFX.h:19,
                 from .pio/libdeps/m5stack-stamps3/M5Unified/src/M5Unified.hpp:19,
                 from .pio/libdeps/m5stack-stamps3/M5Unified/src/M5Unified.h:5,
                 from .pio/libdeps/m5stack-stamps3/M5Cardputer/src/M5Cardputer.h:4,
                 from src/main.cpp:1:
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/platforms/esp32/../esp32/../../misc/DataWrapper.hpp:91:10: note:   because the following virtual functions are pure within 'lgfx::v1::DataWrapperT&lt;fs::SDFS&gt;':
   struct DataWrapperT : public DataWrapper {
          ^~~~~~~~~~~~
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/platforms/esp32/../esp32/../../misc/DataWrapper.hpp:72:17: note:         'virtual int lgfx::v1::DataWrapper::read(uint8_t*, uint32_t)'
     virtual int read(uint8_t *buf, uint32_t len) = 0;
                 ^~~~
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/platforms/esp32/../esp32/../../misc/DataWrapper.hpp:74:18: note:         'virtual void lgfx::v1::DataWrapper::skip(int32_t)'
     virtual void skip(int32_t offset) = 0;
                  ^~~~
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/platforms/esp32/../esp32/../../misc/DataWrapper.hpp:75:18: note:         'virtual bool lgfx::v1::DataWrapper::seek(uint32_t)'
     virtual bool seek(uint32_t offset) = 0;
                  ^~~~
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/platforms/esp32/../esp32/../../misc/DataWrapper.hpp:76:18: note:         'virtual void lgfx::v1::DataWrapper::close()'
     virtual void close(void) = 0;
                  ^~~~~
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/platforms/esp32/../esp32/../../misc/DataWrapper.hpp:77:21: note:         'virtual int32_t lgfx::v1::DataWrapper::tell()'
     virtual int32_t tell(void) = 0;
                     ^~~~
*** [.pio/build/m5stack-stamps3/src/main.cpp.o] Error 1
</code></pre>
<p dir="auto">If possible, could anyone give me a code link or vidui, a tutorial that shows how to display it in a very simple way</p>
]]></description><link>https://community.m5stack.com/topic/6040/cardputer-and-drawjpgfile</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Mar 2026 23:39:51 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6040.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 01 Feb 2024 00:14:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cardputer and drawJpgFile on Fri, 23 Feb 2024 17:03:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I created an issue in the M5GFX repository. Big kudos to <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1229">@lovyan03</a> for providing a very fast answer and solution.<br />
For me the solution for an M5Stack CoreS3 is to add an include for &lt;SD.h&gt;</p>
<pre><code>#include &lt;SD.h&gt;  
#include &lt;M5CoreS3.h&gt;
</code></pre>
<p dir="auto">See <a href="https://github.com/m5stack/M5GFX/issues/79" target="_blank" rel="noopener noreferrer nofollow ugc">M5GFX issue #79 Error: cannot declare variable 'file' to be of abstract type 'lgfx::v1::DataWrapperT<a target="_blank" rel="noopener noreferrer nofollow ugc">fs::SDFS</a>'</a> for reference.</p>
]]></description><link>https://community.m5stack.com/post/24075</link><guid isPermaLink="true">https://community.m5stack.com/post/24075</guid><dc:creator><![CDATA[WpVnDIrPld]]></dc:creator><pubDate>Fri, 23 Feb 2024 17:03:16 GMT</pubDate></item><item><title><![CDATA[Reply to Cardputer and drawJpgFile on Fri, 23 Feb 2024 14:13:15 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I have exactly the same problem and error message when trying to build with VS Code &amp; Platformio having included to libs</p>
<ul>
<li>m5stack/M5CoreS3@^1.0.0</li>
<li>m5stack/M5Unified@^0.1.12</li>
<li>m5stack/M5GFX@^0.1.12</li>
</ul>
<p dir="auto">Is this maybe related to <a href="https://github.com/m5stack/M5GFX/issues/72" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5GFX/issues/72</a> ?<br />
Did you find a solution to compile your code?</p>
<p dir="auto">Cheers</p>
]]></description><link>https://community.m5stack.com/post/24068</link><guid isPermaLink="true">https://community.m5stack.com/post/24068</guid><dc:creator><![CDATA[WpVnDIrPld]]></dc:creator><pubDate>Fri, 23 Feb 2024 14:13:15 GMT</pubDate></item></channel></rss>