-
Notifications
You must be signed in to change notification settings - Fork 10
Add support for 4 color grayscale displays (#71) #72
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
base: master
Are you sure you want to change the base?
Conversation
|
You work fast! Have you tested this out with paperpi, or just here in the library? |
|
I am testing in with paperpi, but currently it has zero effect. I think this crucial step is missing
The good news is: it doesn't crash 😉 |
|
Done that part. Now, this works on my display. However, looks like some adjustments are required in PaperPi too, see downstream ticket. |
| The present values are based on experiments with a 2.7" e-Paper HAT, | ||
| using various photographs and graphics as test inputs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we could tests this with other hardware too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love what you're doing here. When you give me the go-ahead, I can merge this into a testing branch and bump the version number.
If you have any advice or best-practice next steps that you want to share, I'm totally open. I want to be cautious and make sure we don't leave PaperPi high-and-dry with a problematic push.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, you'd have access to various devices, or can ask some volunteers.
In any case, it's best to add an opt-out switch, which makes sense anyway because of this.
| |41. epd4in2b_V2 |False |Unsupported | | ||
| |42. epd4in2b_V2_old |False |Unsupported | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These require .so files from Waveshare, which don't come with the Python package.
txoof
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThomasR Hey, can. you shoot me an email: [email protected]? This work is great, but I've got some stuff going on that's taking a lot of my attention right now. Maybe we can find a good way to move this forward.
|
Hey @txoof, I'm considering closing this PR and canceling my work on this issue. Here's why: Short version: this patch may increase text readability in certain cases, but is almost guaranteed to make image rendering worse than before. Long version: I ran extensive tests with lots of images, and here you can see one of the results: I generated this by emulating the ePaper's output on my PC. Clearly, some color correction is needed, because the unaltered image (in column 3) just looks bad in most cases. So the natural thing to do is to pick a palette that corrects the error. However, there are 2 issues here:
So in conclusion, the 4 gray mode works well if you carefully optimize your image for your display, but in general it is worse than 1bit-dithering. Text readability highly depends on the text color and background. |
|
@ThomasR Wow! Thanks for the incredibly thorough investigation. I'm inclined to think that the added complexity doesn't really add much value in terms of output. If you make any breakthroughs and want to move forward, I'm definitely open. I've noticed some of the artifacts you've documented on 1bit screens in the past, especially the 2in7bc that I have, but never really understood what I was seeing. I always assumed it was due to bad wire connections or something. I also recall being underwhelmed by Pillows 4-color dithering, but never bothered to document it. Your sample images really show its limitations clearly! I've been through several different screens and eventually landed on the larger HD screens because they're much more readable from a distance, allow for practical font anti-aliasing and do reasonable grayscale output. |

resolves #71
Note
This is work in progress.
TODO
getBuffer_4Graylist_compatible_modules()Layoutwhere needed