-
-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Add RGB565 and RGB888 color support to Quantum Painter #19382
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sigprof
requested changes
Dec 20, 2022
tzarc
approved these changes
Jan 3, 2023
KarlK90
requested changes
Jan 10, 2023
KarlK90
approved these changes
Jan 14, 2023
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.
Thanks for the great addition and fixing the bugs. LGTM from my side.
omikronik
pushed a commit
to omikronik/qmk_firmware
that referenced
this pull request
Jan 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request adds native color support (RGB565 and RGB888) to Quantum Painter.
Description
Currently QP only provides support for images and animations with a palette of up to 256 colors. This addition provides for image generation and storage without using palettes, and instead uses the native file format of the display. For RGB565 displays, this makes images take up about 2x the memory compared to using a 256 color palette (since two bytes are used per pixel instead of one byte), and for RGB888 displays, it takes up 3x the memory (since three bytes are used per pixel instead of one byte).
An overriding goal of this implementation was to make handling of native color images no different than that of palette-based images. That is, the keyboard developer does not need to (for example) write directly to pixdata(); all image handling functions are consistent from a keyboard developer perspective. The only difference happens at the time of image generation using the python scripts, in that rgb565 or rgb888 needs to be specified (as appropriate for the target display).
This is certainly not the only way to provide such functionality, it is just one way to do it such that it plays nicely with the existing implementation and interfaces. If these changes do not happen to fit with the vision and direction for Quantum Painter, that is ok, as it can at least inspire and inform future implementation.
Potential improvements in the future:
These changes were tested using an ST7735. I have not tested other displays.
Types of Changes
Issues Fixed or Closed by This PR
Checklist