-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Grayscales in epaper with IT8951 Model: ED078kc2 1872*1404 #147
Comments
@martinberlin LovyanGFX renders E-Paper and monochrome OLEDs by converting RGB colors to grayscale or monochrome tile patterns. Try the following sample code to see if the grayscale can be drawn correctly.
|
Fantastic. I can't wait to arrive home and try it. |
LovyanGFX has a "drawJpg" function.
|
Reopening since sending this large buffer per SPI I'm getting an wdt alert:
Will try to solve it adding a small VTaskDelay and feeding the watchdog. Not sure if it’s strictly related to your component feel free to close. |
@martinberlin
Since the pushImage function correctly handles the case where the image extends beyond the screen, there is no need for clipping in advance. If you need to do the gamma correction in advance, you can prepare a uint8_t array and cast it to the lgfx::grayscale_t* type for drawing.
|
@martinberlin Come to think of it, you first said "This is using epd_fast mode (in epd_quality works bad for me)" If the epd_quality mode works, it will make the EPD work with 16 levels of grayscale. IT8951 should be able to use epd_quality mode, but what problems are you experiencing? |
No problem, a pleasure to support you. Wow! Now I see so that pool picture is rendered using only monochrome tile pattern. STATISTICS draw: 3382 ms . image render with pushImg with gamma corrrection (10x faster) Without gamma correction is faster and works awesome! Total time calculation I (33365) decode: 14183 ms . image decompression Gamma correction now fixed. It just takes some milliseconds more. Awesome again! Many thanks |
Sorry I'm reopening this one, since I tried to update the component Lovyan GFX to the latest stand, and the colors changed dramatically: CODE is the same as when I started this ticket where you drive me to the right results: Has anything changed regarding the colors in the latest updates that I need to be aware of? The colors seem inverted. Other than that the SPI communications part works correctly. |
My bad I was using an image that had the wrong bit-depth :) Note: One thing though that comes all the time when working with big displays is the WDT alert in the monitor
This alerts make the Firmware work really slow, would it be possible to reduce them somehow? |
After fighting with this quite long, I realize that is not Lovyan update that is making the picture to render strange, but rather that I'm testing now with a more modern IDF: All the images look exactly like shown here. I'm also designing a new PCB for Goodisplay ITE 9.7 (1800*825) IT8951 controller and I would really like to use your component to build my Firmware examples. |
Interesting note: Switching to ESP-IDF version <= 4.3 then grayscales work as before. But only renders half of the image (I mean exactly half) UPDATE: Disconnecting it from USB and leaving it to work from the battery it renders the full image. So this effect is not associated with Lovyan at all. The only remaining point is to discover why upgrading the IDF framework to v4.4 is affecting the colors. |
@martinberlin I see you are using tjpgd provided by ESP-IDF instead of drawJpg from LovyanGFX. |
No problem, will try. Closing this since it works just like before, the only problem seems to be the IDF version >4.4 |
First I wanted to say that I really like how this component works and it was a pleasure to install, just a git submodule add Repo components/LovyanGFX
And after checking the custom settings it was already working.
What I could not understand yet is how the colors are represented for this 16 grayscale epapers. I use another library for parallel that is called EPDiy and there 0 is black and 255 is white.
When I try to do 200x200 squares with incrementing colors from 0 to 70 this is what I get:
This is using epd_fast mode (in epd_quality works bad for me)
It looks like after color:30 it starts to get darker again. Can someone please explain or show an example on how to draw the 16 grayscales in one of this epaper?
On another topic: Can be that the VCOM setting, or the Waveform for this model, is different than the one of M5 epaper?
Further info this is the jpeg-render example that I'm trying with my own component:
https://github.com/martinberlin/cale-idf/tree/feature/45-it8951/main/www-jpg-render
The text was updated successfully, but these errors were encountered: