You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a semi-transparent image and custom theme, but seems like the semi-transparent pixels still blend with white (default) color even when custom theme is active. Screenshot:
See "styling" example here: https://github.com/0xd34d10cc/iced/tree/image_edges
Is there a way to fix this?
The text was updated successfully, but these errors were encountered:
0xd34d10cc
changed the title
Image styling options
Semi-transparent image blending problem
Aug 9, 2020
Here is how your image looks without its alpha channel:
iced_wgpu uses bilinear filtering for images by default which can cause artifacts when combined with transparent pixels like the ones in your image. There is a blog post—Beware of Transparent Pixels—that explains some of the details.
If we want to avoid this consistently, we should eventually store images with a premultiplied alpha. This should not be hard, but it's an operation that we should either defer to the GPU, as it consists in applying a transformation to every single pixel of the image, or run in a background worker once we introduce async support to our rendering pipeline.
In the meanwhile, you may be able to fix the issue by editing the image and extend the purple transparent pixels to completely surround the edges of the circle.
I have a semi-transparent image and custom theme, but seems like the semi-transparent pixels still blend with white (default) color even when custom theme is active. Screenshot:
See "styling" example here: https://github.com/0xd34d10cc/iced/tree/image_edges
Is there a way to fix this?
The text was updated successfully, but these errors were encountered: