You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hoped the copy would be something like the original Tazspin.gif:
What actually happened?
Got this:
What are your OS, Python and Pillow versions?
OS: Windows 10
Python: 3.10.4
Pillow: 9.1.0 (slightly modified but you'll get a very similar result with stock 9.1.0)
Discussion:
Duration has been a problem in the past. I think that in the absence of a duration= arg to .save(), the durations ("delay time" in the GIF spec) from the individual frames should be preserved in the output.
Maybe something like this: in _write_multiple_frames() (in GifImagePlugin.py), delete the line
(Note I am including code changed in PR #6176. I am not making a PR out of this because I don't know how to deal with such conflicts and because I am not sure if this is a good fix. Need input from @radarhere.)
And then before the line if isinstance(duration..., insert:
It's fine to create conflicting PRs - it just means that whichever one doesn't get merged in first needs to be updated later. And the test suite is what is there to prevent PRs from breaking things.
I've created PR #6265, similar to your suggestion.
What did you do?
Copied an animated GIF:
What did you expect to happen?
Hoped the copy would be something like the original Tazspin.gif:
What actually happened?
Got this:
What are your OS, Python and Pillow versions?
Discussion:
Duration has been a problem in the past. I think that in the absence of a
duration=
arg to.save()
, the durations ("delay time" in the GIF spec) from the individual frames should be preserved in the output.Maybe something like this: in
_write_multiple_frames()
(inGifImagePlugin.py
), delete the lineThen modify the code that sets
im.encoderinfo
fromim_frame.info
:(Note I am including code changed in PR #6176. I am not making a PR out of this because I don't know how to deal with such conflicts and because I am not sure if this is a good fix. Need input from @radarhere.)
And then before the line
if isinstance(duration...
, insert:This seems to give me the desired result:
I hope it doesn't break anything.
The text was updated successfully, but these errors were encountered: