Closed vitasynergy closed 1 year ago
Can you email me the images (they might have been changed in the github window) (bitbank@pobox.com). My library only supports baseline Huffman images. If they're progressive or arithmetic coding, then they won't work. Have you checked the return codes?
Hi, thanks for your reply.
Please find attached the whole arduino code project directory as much as the log.
It seems that all the images are baseline jpg.
Thanks - I'll take a look.
I don't have the hardware you're using, but I do have an ESP32-S3 device with capacitive touch from MakerFabs, so I used that to test. My code works correctly, so basically, "the problem is you" :). Here's the working sketch and photographic proof.
makerfabs_sd_navigator.ino.zip
Hello, I've tried without success to display some JPG images on a ESP32-4827S043-C Sunton 480x272 pixels lcd with capacitive touch (is an ESP32-S3 lcd display having a GT911 capacitive touch controller and an ILI6485 display controller).
The JPEGDEC chain works using the sample "octocat.jpg" image but not with any other jpg image (whatever jpg image it is).
Btw : the elapsed time to show the octocat.jpg is always around 470ms while the elapsed for the others is always around 11ms....
Furthermore, the "gfx->fillScree(COLOR) works properly : fills the screen with BLACK then RED then BLUE the YELLOW...and the touch works properly too.
Help will be really appreciated, Thanks
![octocat](https://github.com/bitbank2/JPEGDEC/assets/134950983/a60b5a2c-a374-4cc5-bcba-36bd97cdc33d)
The code extract I'm using follows (the jpg images are loaded into the "data" directory of the Arduine ide project :
define JPEG_FILENAME1 "/octocat.jpg"
define JPEG_FILENAME2 "/vegetables.jpg"
define JPEG_FILENAME3 "/roadbig.jpg"
define JPEG_FILENAME4 "/bananas.jpg"
........
void loop() {
Serial.println("on loop : Init display controller ILI6485 to BLACK"); gfx->fillScreen(BLACK);
start=0; start=millis(); Serial.printf("cuurent file: %s \n", JPEG_FILENAME2); jpegDraw(JPEG_FILENAME2, jpegDrawCallback, true / useBigEndian /, 0 / x /, 0 / y /, H_RES / widthLimit gfx->width()/, V_RES / heightLimit gfx->height()/); Serial.printf("JPEG_FILENAME2 draw time: %lu\n", millis() - start);
delay(1000);
Serial.println("on loop : Init display controller ILI6485 to RED"); gfx->fillScreen(RED);
start=0; start=millis(); Serial.printf("cuurent file: %s \n", JPEG_FILENAME1); jpegDraw(JPEG_FILENAME1, jpegDrawCallback, true / useBigEndian /, 0 / x /, 0 / y /, H_RES / widthLimit gfx->width()/, V_RES / heightLimit gfx->height()/); Serial.printf("JPEG_FILENAME1 draw time: %lu\n", millis() - start);
delay(1000);
Serial.println("on loop : Init display controller ILI6485 to BLUE"); gfx->fillScreen(BLUE);
start=0; start=millis(); Serial.printf("cuurent file: %s \n", JPEG_FILENAME3); jpegDraw(JPEG_FILENAME3, jpegDrawCallback, true / useBigEndian /, 0 / x /, 0 / y /, H_RES / widthLimit gfx->width()/, V_RES / heightLimit gfx->height()/); Serial.printf("JPEG_FILENAME3 draw time: %lu\n", millis() - start);
delay(1000);
Serial.println("on loop : Init display controller ILI6485 to YELLOW"); gfx->fillScreen(YELLOW);
start=0; start=millis(); Serial.printf("cuurent file: %s \n", JPEG_FILENAME4); jpegDraw(JPEG_FILENAME4, jpegDrawCallback, true / useBigEndian /, 0 / x /, 0 / y /, H_RES / widthLimit gfx->width()/, V_RES / heightLimit gfx->height()/); Serial.printf("JPEG_FILENAME4 draw time: %lu\n", millis() - start);
delay(1000); }