1
0
Fork 0

Add RGB565 and RGB888 color support to Quantum Painter (#19382)

This commit is contained in:
David Hoelscher 2023-01-14 04:24:54 -06:00 committed by GitHub
parent 5873fbe569
commit 45851a10f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 226 additions and 43 deletions

View file

@ -38,11 +38,13 @@ bool qgf_parse_format(qp_image_format_t format, uint8_t *bpp, bool *has_palette)
[PALETTE_2BPP] = {.bpp = 2, .has_palette = true},
[PALETTE_4BPP] = {.bpp = 4, .has_palette = true},
[PALETTE_8BPP] = {.bpp = 8, .has_palette = true},
[RGB565_16BPP] = {.bpp = 16, .has_palette = false},
[RGB888_24BPP] = {.bpp = 24, .has_palette = false},
};
// clang-format on
// Copy out the required info
if (format > PALETTE_8BPP) {
if (format > RGB888_24BPP) {
qp_dprintf("Failed to parse frame_descriptor, invalid format 0x%02X\n", (int)format);
return false;
}