Add RGB565 and RGB888 color support to Quantum Painter #19382
Merged
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