-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[image][online_image][animation] Fix transparency in RGB565 #7631
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
Conversation
Hey there @Syndlex, mind taking a look at this pull request as it has been labeled with an integration ( |
Hey there @guillempages, mind taking a look at this pull request as it has been labeled with an integration ( |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #7631 +/- ##
==========================================
+ Coverage 53.70% 54.00% +0.29%
==========================================
Files 50 50
Lines 9408 9724 +316
Branches 1654 1348 -306
==========================================
+ Hits 5053 5251 +198
- Misses 4056 4147 +91
- Partials 299 326 +27 ☔ View full report in Codecov by Sentry. |
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.
Hm. I don't know why, but when testing this PR with an animation, the animation is now showing wrong.
Looks like there is something wrong with reading the pixels. (My animation is using RGB565 with transparency; maybe the drawing part of the animation also needs updating for the 3bytes per pixel somewhere?
Took a video: https://github.com/user-attachments/assets/232af92a-6b51-43ca-8dc2-eed7aaec9a21
Without the pr:
https://github.com/user-attachments/assets/199408d7-12ef-4ef3-9221-af625bc92340
(Ignore the cross/"HI" on the top left, that's a different issue (I hope))
More than likely. I did make some changes to animation, but didn't test it 🤔 I did test regular images and online images. Will do some testing and update. |
Fixed now - the python code to convert the animated GIF needed updating too. |
What does this implement/fix?
When images were converted to RGB565 with transparency, especially from SVG, anti-aliasing was lost as the image format use chroma-keying instead of an alpha channel.
This PR changes the RGB565 with transparency format to one that has a proper alpha channel, so anti-aliasing works as expected.
Types of changes
Related issue or feature (if applicable): fixes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#
Test Environment
Example entry for
config.yaml
:# Example config.yaml
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: