Content-Length: 263681 | pFad | https://github.com/adafruit/circuitpython/pull/10173

49 TilePaletteMapper support for ColorConverter by FoamyGuy · Pull Request #10173 · adafruit/circuitpython · GitHub
Skip to content
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

TilePaletteMapper support for ColorConverter #10173

Merged
merged 3 commits into from
Mar 27, 2025

Conversation

FoamyGuy
Copy link
Collaborator

Adds support for using ColorConverter() instead of a palette. Renamed palette property and internal variables to pixel_shader

@tannewt tannewt self-requested a review March 27, 2025 18:27
self->width_in_tiles = width;
self->height_in_tiles = height;
self->input_color_count = input_color_count;
self->needs_refresh = false;
int mappings_len = width * height;
self->tile_mappings = (uint16_t **)m_malloc(mappings_len * sizeof(uint16_t *));
self->tile_mappings = (uint32_t **)m_malloc(mappings_len * sizeof(uint32_t *));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to make this smarter in the future to scale the output values depending on the pixel shader. uint32_t for CC. uint8_t for small palettes and uint16_t for larger ones.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit 70fe5cd into adafruit:main Mar 27, 2025
509 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/adafruit/circuitpython/pull/10173

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy