"gallery/transforms/plot_transforms_e2e.py" did not exist on "90e0b79229ae68ad869515cfb1e556ae018233c3"
Unverified Commit 8de78001 authored by Masamune Ishihara's avatar Masamune Ishihara Committed by GitHub
Browse files

Add fps argument to export_to_gif function. (#6786)

parent 3ac23577
......@@ -28,7 +28,7 @@ def buffered_writer(raw_f):
f.flush()
def export_to_gif(image: List[PIL.Image.Image], output_gif_path: str = None) -> str:
def export_to_gif(image: List[PIL.Image.Image], output_gif_path: str = None, fps: int = 10) -> str:
if output_gif_path is None:
output_gif_path = tempfile.NamedTemporaryFile(suffix=".gif").name
......@@ -37,7 +37,7 @@ def export_to_gif(image: List[PIL.Image.Image], output_gif_path: str = None) ->
save_all=True,
append_images=image[1:],
optimize=False,
duration=100,
duration=1000 // fps,
loop=0,
)
return output_gif_path
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment