-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading Images from memory #28
Comments
// tft.jpgimage(X, Y, scale, file_name, buf, size] So you can use the 5th parameter which is a buffer to send the image to the function |
Hello, I try to load jpg img from memory too but with no success: #include "img1.h" //converted JPG into c array memcpy(disp_buffer, (unsigned char *)img1, sizeof(img1)); Do you see what am I doing wrong? |
Don't see anything wrong. |
Hello, thanks for you answer! the whole project is great and works fine (also with file name), however I am trying to load other img after an OTA (the device is in another land and there is no way to flash the device manually), so I can't work with file name anymore, that is the reason why I am try to save image directly in memory. it compiles but crashes: Guru Meditation Error: Core 0 panic'ed (StoreProhibited) Any idea what I could do? |
https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/fatal-errors.html From your stack dump it shows this So there is something wrong with the pointer being used. Sorry I don't have further expertise to help in this... but above information should give some idea on where to look for a solution. |
Thanks for the link sukeshak! I changed the code: int sz=sizeof(img); The CPU doesn't crash anymore :) |
Ok I have found it, I am going to study it :) |
Well I get JDR_FMT1 as result what means the format is wrong. I have seen in rom/tjpgd.h format is RGB888 3bytes/pixel what I have chosen. Then I have seen another project of Loboris: https://github.com/loboris/ESP32_ePaper_example which alos use images from memory (at least I believe) and took from it the img1.h. The function EPD_jpg_image is almost the same as the TFT_jpg_image. But still doesn't work :( . Have you already loaded an image from memory with success? |
Looks like some progress made :) I am on an international travel so don't have any hardware to try. Will be at least a week plus before I get a chance. Did you try an image which is part of his samples for testing, to isolate it? |
Also probably you can try this since bmp is less complicated TFT_bmp_image |
Well I won't give up with JPG :) ! |
Using the BMP function is just to further isolate the issue... Here is the code you need to debug... good luck :) ESP32_TFT_library/components/tft/tft.c Line 2376 in aa21772
|
well that is indeed the code I am trying to debug. I am stucked into the static UINT tjd_buf_input ( |
when I take jpg from SPIFFS it shows the right size:
} |
Hi, great library!
I see that's its possible to load a image from memory (not spiffs), do you have an example on how this is done?
The text was updated successfully, but these errors were encountered: