zoomx
Thu Feb 04, 2016 1:42 pm
rowboteer have posted today a library that decode Jpeg on Mega and Due.
http://forum.arduino.cc/index.php?topic=376768
https://github.com/Bodmer/JPEGDecoder
The example decode an image and show it on a TFT LCD. There are limitations but it’s better than nothing!
Since I don’t have an STM32 nearby I can’t test this.
RogerClark
Thu Feb 04, 2016 9:00 pm
interesting…
Thanks
zoomx
Tue Feb 16, 2016 10:05 am
I got compiled easily with simple changes the TFT_flash_jpg_v2 example
1) Removing TFT_HX8357 library and using
#include <ILI9341_due_gText.h>
#include <ILI9341_due.h>
#define TFT_DC PA15
#define TFT_CS PB4
#define rst PB3
ILI9341_due tft = ILI9341_due(TFT_CS, TFT_DC, rst);
RogerClark
Tue Feb 16, 2016 9:17 pm
Where are you storing the JPEG, in the code ?
If so, I can see this is good for a test, but sd card is probably the best place to store the data for real applications
zoomx
Wed Feb 17, 2016 10:48 am
You’re right, I just making a test and the jpg is in the code, SD is much better! But now the big flash eater seems to be the TFT library.
zoomx
Wed Feb 17, 2016 1:33 pm
It Works!
I changed only the CS line define from PB4 to PA4 because it is close to the other SPI lines.
RogerClark
Wed Feb 17, 2016 9:31 pm
zoomx wrote: But now the big flash eater seems to be the TFT library.
zoomx
Thu Feb 18, 2016 7:01 am
RogerClark wrote:
Is it the built in fonts that take so much space
Is it the built in fonts that take so much space
stevestrong
Fri Jan 20, 2017 3:17 pm
The increase in size is caused by the constructor “new uint16_t[]” array used in line 335 of the decoder.
See related forum thread.
I have raised an issue regarding this and the solution applied, which doesn’t seem to work flawlessly.
See related forum thread.
I have raised an issue regarding this and the solution applied, which doesn’t seem to work flawlessly.
stevestrong
Tue Jan 24, 2017 3:42 pm
Just as info, if someone is interested, the bug in JPEG lib has been corrected.
Now all images fit simultaneously in the blue pill’s flash when using static array instead of “new uint16[]” array, and the display is free from errors. Of course, the images can be also loaded from SD card, if available.
A 320×480 image is loaded from flash onto same resolution display within ~800msec (CPU=72MHz, flash wait states=1, SPI=36MHz).
Now all images fit simultaneously in the blue pill’s flash when using static array instead of “new uint16[]” array, and the display is free from errors. Of course, the images can be also loaded from SD card, if available.
A 320×480 image is loaded from flash onto same resolution display within ~800msec (CPU=72MHz, flash wait states=1, SPI=36MHz).
zoomx
Tue Jan 24, 2017 9:14 pm
Great!
nopnop2002
Sat Apr 14, 2018 8:23 am
I added the function of JPEG View.
zoomx
Mon Apr 16, 2018 2:07 pm
Thanks for sharing, maybe I can reuse some 8bit parallel TFT that I have!


