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
Conversion utility functions don't convert bit depth #2
Comments
Stream Decks don't support anything else than 8-bit images. I'll try to explain my codebase good whenever I get to writing documentation for plugin dev |
Pushed out fixes to this (decided to just do it now), hopefully it works now. The problem did also appear with normal usage of the software, and after fixes, it works as expected. Everything image related was moved to |
Thanks for the quick turnaround.
I see, it did seem different. Is the expectation that a plugin would add its images when it's first added? Or should it just be up to the user to decide what to use? |
I expect the user to add the images they want, but plugins can also add images. The core reference contains I personally prefer just doing some ascii art for components I define, so user can later decide the looks of the button on their own |
Description
I was trying to render an image with a custom renderer and my image kept not being rendered even though the
write_image
method returns success. It turns out (at least my "Original V2") the image does not work if it's 16-bit but does if it's 8-bit.Steps to Reproduce
Take a 16-bit PNG image, e.g. the lightbulb from https://www.home-assistant.io/integrations/light/ to put into a component and modify the example in this repo to load that image instead of the gradient.
This succeeds but the device does not show anything. It does work if I change the bit depth to 8 and then load the same module. If I do
instead, then that works.
Expected behavior
The conversion utility methods should take care of the conversion to 8-bit (or whatever else that we do need). It seems to be that the bit depth is the one difference here.
Screenshots
It'd just be a blank button vs one with anything in it.
The text was updated successfully, but these errors were encountered: