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

convert tuple to hex color first #149

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

FoamyGuy
Copy link
Contributor

@ladyada
Resolves: #145

clamp() and the rest of convert_pixel assume that pixel will be a hex value, but in some cases they come in as color tuple. This converts them to hex before continuing. I tested this fix successfully with a ILI9341 on Pi4 with a modified version of the png test script from examples in the ImageLoad repo examples. I also tested ili9341_pitft_simpletest.py to ensure this change doesn't cause any issues for non-imageload usage.

@FoamyGuy FoamyGuy marked this pull request as ready for review January 20, 2025 15:31
@ladyada
Copy link
Member

ladyada commented Jan 21, 2025

@makermelissa can you review please!

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks

@FoamyGuy FoamyGuy merged commit a42ece2 into adafruit:main Jan 22, 2025
1 check 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.

Loading images crashes with color int/tuple error
3 participants