-
Notifications
You must be signed in to change notification settings - Fork 7k
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
decode_gif: add transparency support and image offsets #8419
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8419
Note: Links to docs will display an error until the docs builds have been completed. ❌ 8 New FailuresAs of commit 8c228f5 with merge base 51429c2 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @NicolasHug !
Hey @NicolasHug! You merged this PR, but no labels were added. |
Reviewed By: vmoens Differential Revision: D57565238 fbshipit-source-id: 06cbf21115c79950711f6100832a06a7f495ca81
This PR now properly handles transparency within the GIF, and also allows each individual image to start at its own Top and Left offset. For docs on how transparency is encoded in GIFs, see https://giflib.sourceforge.net/whatsinagif/animation_and_transparency.html
Turns out the decoder was unable to properly decode https://en.wikipedia.org/wiki/GIF#/media/File:Rotating_earth_(large).gif, but now it's fine.
Benchmark. Slighly slower than before but the relative speed compared with PIL is similar to before.