(image: List[PIL.Image.Image], output_gif_path: str = None)
| 506 | |
| 507 | |
| 508 | def export_to_gif(image: List[PIL.Image.Image], output_gif_path: str = None) -> str: |
| 509 | if output_gif_path is None: |
| 510 | output_gif_path = tempfile.NamedTemporaryFile(suffix=".gif").name |
| 511 | |
| 512 | image[0].save( |
| 513 | output_gif_path, |
| 514 | save_all=True, |
| 515 | append_images=image[1:], |
| 516 | optimize=False, |
| 517 | duration=100, |
| 518 | loop=0, |
| 519 | ) |
| 520 | return output_gif_path |
| 521 | |
| 522 | |
| 523 | @contextmanager |
nothing calls this directly
no outgoing calls
no test coverage detected