Bodmer / TJpg_Decoder

Jpeg decoder library based on Tiny JPEG Decompressor
Other
222 stars 42 forks source link

Redraw TFT image if TFT SDO/MISO output is unavailable #53

Closed hansaplasst closed 1 year ago

hansaplasst commented 1 year ago

Hi Bodmer,

I'm testing the Animated_dial example with an ESP8266 and GC9A01 round display without SDO/MISO. This means that with the existing code you cannot write image data over an existing background image without erasing (parts of) the data.

Without MISO however, we could use parts of the original background image data from dial.h to but back clean image data to the TFT? Is this possible with your function library?

Bodmer commented 1 year ago

Yes, it is possible and I have written an experimental sketch that works that way. I will see if I can find it.

hansaplasst commented 1 year ago

Thanks for the quick reply! That would be awesome!

Bodmer commented 1 year ago

It think I must have archived, it will be a couple of days before I can run a search.

Bodmer commented 1 year ago

There is an example here: https://github.com/Bodmer/TFT_eSPI/discussions/860#discussioncomment-208303

However you may find the esp8266 does not have sufficient RAM.

hansaplasst commented 1 year ago

Thanks! I will check it out.

hansaplasst commented 1 year ago

That example worked out great! Here is what I've come up with.

Animated_dial_noTFTrd.zip

Thanks again for your help!

hansaplasst commented 1 year ago

BTW. Does the pivot point need to be within a sprite's boundaries (width and height)?

Bodmer commented 1 year ago

No, it can be outside. See notes here.

I tried your animated dial example and it works well and fast on an RP2040 with parallel display. Excellet! I had some stray red pixels left by the tip of the needle.