Update image_converter.rgb_to_color565 to make converted colors more accurate. #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
I noticed while working on a project, and using your display driver, that the original
rgb_to_color565
code seems to output some inaccurate colors.This is easy to test by passing (255, 255, 255), which should become 0xffff, but instead becomes 0xfff8.
I've replaced it with some code that outputs 0xffff, and otherwise just outputs more accurate colors.
The main
st7789py.py
file still uses the other implementation, but I was hesitant to change it because I haven't tested to see if there's a speed difference, or anything like that.