Spaces:
Running
Running
fix animation duration broken
Browse files
app.py
CHANGED
@@ -115,7 +115,8 @@ def convert_webp_to_images(webp_path):
|
|
115 |
image.seek(i)
|
116 |
frame = image.copy()
|
117 |
frames.append(frame)
|
118 |
-
|
|
|
119 |
durations.append(duration)
|
120 |
else:# webp never happen?
|
121 |
frames.append(image)
|
|
|
115 |
image.seek(i)
|
116 |
frame = image.copy()
|
117 |
frames.append(frame)
|
118 |
+
# frame.info must be dictionary
|
119 |
+
duration = frame.info.get("duration",100)
|
120 |
durations.append(duration)
|
121 |
else:# webp never happen?
|
122 |
frames.append(image)
|