We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Any GIFs having transparent pixels are decoded as full opaque. For example: https://upload.wikimedia.org/wikipedia/commons/c/ce/Transparent.gif
#[test] fn minimal_example() { let file = File::open("tests/Transparent.gif").unwrap(); let mut decoder = gif::Decoder::new(file); decoder.set(gif::ColorOutput::Indexed); let mut reader = decoder.read_info().unwrap(); let mut screen = gif_dispose::Screen::new_reader(&reader); while let Some(frame) = reader.read_next_frame().unwrap() { screen.blit_frame(&frame).unwrap(); let mut t = "alpha == 255"; for pixel in screen.pixels.as_ref() { if pixel.a != 255 { t = "transparent"; } } println!("{}", t); // "alpha == 255" } }
The text was updated successfully, but these errors were encountered:
Thanks for the report.
I've assumed that when a GIF has a background color set, it wants to have a background. This image does set background color to index 0.
Sorry, something went wrong.
For this image I think fe9b8a3 solves it.
I've also found another issue, which I don't know how to solve: image-rs/image-gif#52
Okay, this only works for the first frame. Looks like we have to wait a decision on the issue gif-crate.
No branches or pull requests
Any GIFs having transparent pixels are decoded as full opaque.
For example: https://upload.wikimedia.org/wikipedia/commons/c/ce/Transparent.gif
The text was updated successfully, but these errors were encountered: