loboris / ESP32_TFT_library

Full featured TFT library for ESP32 with demo application
553 stars 219 forks source link

Display JPG and BMP images for wrover kit V3 with ILI9341 #40

Open jjfretired opened 6 years ago

jjfretired commented 6 years ago

Here are the changes I made to the ESP32_TFT_library to display jpg and bmp images. It will display the test images. If you add images you have to add code in tft_demo.c. I added images and had to increase the flash size. I used FastStone Photo Resizer to reduce my jpg files down

    run - make menuconfig
            Serial flasher config
                    change ttyUSB0 to ttyUSB1
                    change (if needed) Flash size (2 Mo)
                            tp (4 MB)

            TFT Display Demo configuration
                    change (if needed) (1048576) Size in bytes

                    Select predefined display confuration (None)
                            change to M5Stack TTF display

    in main/tft_demo.c

            add  after #include "spiffs_vfs.h"

                    #include "esp_vfs.h"

            add  in function disp_images() after disp_header("JPEG IMAGES");

    sprintf(tmp_buff, SPIFFS_BASE_PATH"/images");

"JPG-BMP" 124L, 5528C written 1,1 Top

bishibashiB commented 5 years ago

HI @jjfretired , JPG worked for me but the BMP driver only allows for a 40Byte BMP file header 'BITMAPINFOHEADER' . Did you get around it or do you have a tool to convert to this BMP sub-type?