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

Fix wrong frame compositing logic #110

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

Juliapixel
Copy link
Contributor

previously, the canvas was completely cleared, using the background color, before compositing the current frame on it. this PR corrects that, instead only clearing the rectangle that was occupied by the frame before the one being composited, if it had requested to be disposed of.

along with #85, this PR fixes image-rs/image#2320 and produces the following gif, when using the same code snippet and gif provided:
derpy_cloud_right

i'm not entirely sure, however, when the background color provided in the ANIM frame should be used, as this library still produces results that are different from web browsers and other image viewing programs, that seem to just assume a fully transparent bg color in all cases (or maybe only when the animated webp is transparent?)

@Juliapixel
Copy link
Contributor Author

also thought i might add that this is what the produced gif looks like using the current commit:
derpy_cloud_right

@kornelski kornelski merged commit ce638c7 into image-rs:main Sep 18, 2024
7 checks passed
@kornelski
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

Animated WebP decoding error
2 participants