Page 1 of 2

Fade 1 image to show another.

Posted: Wed Apr 14, 2021 5:32 am
by AJB2K3
Hi, I planning a project that has two grayscale images placed one over the other.
Is there a way in micropython to have the top image fade from full visibility to 0 visibility making the bottom visable?
Or even only fade the pixels that are different colours?

Re: Fade 1 image to show another.

Posted: Wed Apr 14, 2021 9:25 am
by pythoncoder
You might be more likely to get a response if you told us what hardware you plan to use: display type and host device.

Re: Fade 1 image to show another.

Posted: Wed Apr 14, 2021 3:40 pm
by AJB2K3
sorry, I was planning to use a GC9A01 round screen with esp32 D0DQ6 esp32 pico d4 and RP2040.

GC9A01 display driver

Posted: Thu Apr 15, 2021 7:46 am
by pythoncoder
OK, so the question is whether anyone has written a MicroPython driver for the GC9A01 display. I'm not aware of one, and a forum search draws a blank. You may have to DIY. This usually involves porting Arduino C code to MicroPython, a task that requires familiarity with low level coding in both languages and being comfortable reading device datasheets.

Re: GC9A01 display driver

Posted: Thu Apr 15, 2021 3:39 pm
by AJB2K3
pythoncoder wrote:
Thu Apr 15, 2021 7:46 am
OK, so the question is whether anyone has written a MicroPython driver for the GC9A01 display. I'm not aware of one, and a forum search draws a blank. You may have to DIY. This usually involves porting Arduino C code to MicroPython, a task that requires familiarity with low level coding in both languages and being comfortable reading device datasheets.
That is going to be the hard part but I was wondering if there was a generic graphical routine for the fade effect.
I have an idea on how to do it but it will be slow and memory intensive.

Re: GC9A01 display driver

Posted: Thu Apr 15, 2021 3:46 pm
by scruss
pythoncoder wrote:
Thu Apr 15, 2021 7:46 am
OK, so the question is whether anyone has written a MicroPython driver for the GC9A01 display.
There isn't one, but there is for CircuitPython. Tod Kurt (@todbot) suggested it's very similar to other displays, except it has a custom init code: https://github.com/tylercrumpton/Circui ... /gc9a01.py

Re: GC9A01 display driver

Posted: Thu Apr 15, 2021 5:36 pm
by AJB2K3
scruss wrote:
Thu Apr 15, 2021 3:46 pm
pythoncoder wrote:
Thu Apr 15, 2021 7:46 am
OK, so the question is whether anyone has written a MicroPython driver for the GC9A01 display.
There isn't one, but there is for CircuitPython. Tod Kurt (@todbot) suggested it's very similar to other displays, except it has a custom init code: https://github.com/tylercrumpton/Circui ... /gc9a01.py
Todbot?
And here I thought he was an actual bot!
Thanks for the link!

Re: Fade 1 image to show another.

Posted: Thu Apr 22, 2021 8:21 pm
by russ_h
I'm working on a driver for the GC9A01 display. The driver is working with this display on a Raspberry Pi PICO. After a little more testing I'll try it with the ESP32. I should have something up on GitHub this weekend.
IMG_4225.jpg
IMG_4225.jpg (32.07 KiB) Viewed 6924 times

Re: Fade 1 image to show another.

Posted: Fri Apr 23, 2021 5:55 am
by pythoncoder
I love that watch display with all its detail - even shadows under the hands. I know just how much work it takes to produce a display as pretty as that.

Re: Fade 1 image to show another.

Posted: Fri Apr 23, 2021 2:57 pm
by russ_h
Pictures don’t do it justice, it looks even better in person.
9CC2A3EF-A5F3-420C-AEC2-371883B9A78C.jpeg
9CC2A3EF-A5F3-420C-AEC2-371883B9A78C.jpeg (81.54 KiB) Viewed 6892 times