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

PNG with a transparent background to Jpeg #711

Open
stephane-archer opened this issue Jan 10, 2025 · 3 comments
Open

PNG with a transparent background to Jpeg #711

stephane-archer opened this issue Jan 10, 2025 · 3 comments

Comments

@stephane-archer
Copy link

testAlpha.png.zip

this image is a PNG with a transparent background. when encoding this image to jpeg I expect the background to become white (or black) but here some other element appears.

@brendan-duncan
Copy link
Owner

I'll get to this soon, catching up on some other work first.

@brendan-duncan
Copy link
Owner

Pushed a fix that will blend alpha pixels with (image.backgroundColor ?? white) for the jpeg encoder.
png_testAlpha

@stephane-archer
Copy link
Author

stephane-archer commented Jan 14, 2025

@brendan-duncan thank you! you are the best! 😃

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

No branches or pull requests

2 participants