-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Animated GIFs aren't correct after first frame and lost transparency #1976
Comments
I feel like looking at #1525 would be a good starting point. |
Also suspect that this is appropriate: #1987 (comment) |
Thanks for the links. I did try a few of these with no success. I opened this mainly because it was incredibly hard to round up all the information on GIF issues. Unfortunately this was blocking a feature request for us so we have had to use a different package. I wish I had the time to look into and try fix this myself. |
I documented a workaround for this on StackOverflow: https://stackoverflow.com/a/59729588/2111778 :-) I hope this gets fixed soon as this is really just a case of also copying the |
So if I understand correctly, using In which versions of pillow would this be fixed? |
There are multiple Pillow issues regarding GIF, some fixed, some not. So without talking about a specific image, it's hard to have a discussion. For some reason if I try and go back to Pillow 3.2 - Pillow 4.0, I get After that, #2902 added the #3708 fixed an issue with disposal method 2, where the last frame of the output banana GIF was cropped wrongly. #5125 was released as part of Pillow 8.1.0. This fixed a problem if the disposal method was not the same throughout a GIF. Before that, the last frame of the output banana GIF wrongly included a copy of the second last frame. |
What did you do?
I open an animated GIF and immediately save it back out to another file.
What did you expect to happen?
The image to be the same as it was when it was uploaded.
What actually happened?
The transparency is gone on the first frame and all subsequent frames have a black background.
What versions of Pillow and Python are you using?
3.2.0
Please include code that reproduces the issue and whenever possible, an image that demonstrates the issue. The best reproductions are self-contained scripts with minimal dependencies.
banana
output
I am aware there are a lot of issues related to animated GIFs but I am struggling to get a coherent understanding of the issue.
I have other GIFs which act differently and just distort all subsequent frames.
otter
output
I am happy to provide any more information if needed. I'm willing to fix this myself if needs be. I just don't know enough about Pillow's internals or where to even start with an issue like this.
I forgot to add there is an error appearing which says a colour can't be found for transparent. I will post the actual error later when I am at my computer.
Thanks in advance.
The text was updated successfully, but these errors were encountered: