-
Notifications
You must be signed in to change notification settings - Fork 666
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
Black color in a png is rendered as transparent in gif #82
Comments
@xql279671304 I think that's a separate problem, of variable transparency resulting in blackness because it's overlaid on a black background. You're supposed to be able to set the background color, which can make the GIF look better on a specific background, although this is apparently broken, or never worked. The GIF format doesn't support variable transparency, so that can't be an option, but there could be an option to generate sharp (aliased) edges with the original RGB, only quantizing the alpha to binary (one bit) based on some threshold. @tsunamilx There's a PR to fix or work around this #77 |
Has this problem been solved? I have the same problem. Can you share the core code? @xql279671304 |
gif 不支持透明通道,png 图片的透明像素会在这个库的处理过程中变成 rgba(0,0,0,0),去掉透明通道,最终呈现 rgb(0,0,0),也就是黑色。 |
See screenshot below:
My code:
The text was updated successfully, but these errors were encountered: