Closed geprc closed 4 years ago
It looks your screen has an offset of sbout 40 pixels. A quick fix is to add this offset in your sketch. Instead of 0,0 cordinates, try 40,40
40, 40 will be this
and 40, 70 will be this
and if i use function drawBmp(), it will be ok,it seems that function drawJpgFile() is not adaptation with st7789,or pixel 240*135
I have marked this as a bug. Thanks for raising the issue. The display you are using has some offsets so it appears that these are not being used when rendering a jpeg file.
You could try this new jpeg library.
I am not in a position to investigate the bug at the moment but will have a look in a few days time.
I have tested it with the new Tjpg_Decoder library here and this example works: SPIFFS_Jpg_T1.zip
Using the Tjpg_Decoder library is therefore an option for you until I can track down the bug.
I think I will be stripping out the ESP32 related jpeg code as it has a rather awkward API, and update the examples to use the TJpg_Decoder library, that library also uses a more up-to-date version of the decoder engine.
ESP32 dev module with ST7789 display connected to hardware SPI.
When trying to display a SPIFFS jpg image which is 135x135 landscape orientation the image displays smaller with a block of background colour filling the rest of the screen.
I've modified the example sketch like this:
Just like this:
![IMG_20191024_184102](https://user-images.githubusercontent.com/48548067/67478130-091a0580-f68e-11e9-934b-2bfd2268bbf8.jpg)