Bodmer / TJpg_Decoder

Jpeg decoder library based on Tiny JPEG Decompressor
Other
222 stars 42 forks source link

Error compiling for Teensy 4.1 #67

Closed ZL1CVD closed 1 year ago

ZL1CVD commented 1 year ago

Seems Teensy SD lib expects pFilename as const char* and not String..

error: cannot convert 'const String' to 'const char*' 397 | if ( !SD.exists(pFilename) )

Note I am not using any method that requires loading JPG from SD. My JPG is stored as const uint8_t logo[]

Lib compiles & works fine for ESP8266, ESP32, ESP32-S3. Just has issues with Teensy 4.x

Bodmer commented 1 year ago

As a work-around, comment out this line, recompile and upload:

https://github.com/Bodmer/TJpg_Decoder/blob/master/src/User_Config.h#L5

I have not tried the library with a Teensy so there may be other processor specific issues. If you do (or do not) get it working then post back.

ZL1CVD commented 1 year ago

Worked a treat! Thank you so much! Now compiles without error. But note for ESP8266 I needed TJpgDec.setSwapBytes(true); For Teensy 4.1 commented this out..

Thanks again for your assistance..