(image: List[PIL.Image.Image], output_gif_path: str = None)
| 408 | |
| 409 | |
| 410 | def export_to_gif(image: List[PIL.Image.Image], output_gif_path: str = None) -> str: |
| 411 | if output_gif_path is None: |
| 412 | output_gif_path = tempfile.NamedTemporaryFile(suffix=".gif").name |
| 413 | |
| 414 | image[0].save( |
| 415 | output_gif_path, |
| 416 | save_all=True, |
| 417 | append_images=image[1:], |
| 418 | optimize=False, |
| 419 | duration=100, |
| 420 | loop=0, |
| 421 | ) |
| 422 | return output_gif_path |
| 423 | |
| 424 | |
| 425 | @contextmanager |
nothing calls this directly
no outgoing calls
no test coverage detected