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

Rendering a picture on a plot renders alpha channel incorrectly #524

Open
TheQuantumPhysicist opened this issue Dec 1, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@TheQuantumPhysicist
Copy link

TheQuantumPhysicist commented Dec 1, 2023

Using this example: https://github.com/plotters-rs/plotters/blob/master/plotters/examples/blit-bitmap.rs

The problem is that even if the PNG has a transparent background, it's rendered in the plot incorrectly. I dug into this a little bit and I think this is because the BitMapElement doesn't support having alpha channel and it uses RGB instead of RGBA (I saw the image library supports RGBA). I think this is a bug and should be fixed.

To prove the issue exists, simply make a plot, then render a picture above the plot. The picture's rectangle will simply wipe everything under it, even if the PNG has a transparent background.

@TheQuantumPhysicist TheQuantumPhysicist added the bug Something isn't working label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant