(images: Iterable[Image.Image | None])
| 79 | |
| 80 | |
| 81 | def max_content_size(images: Iterable[Image.Image | None]) -> tuple[int, int]: |
| 82 | widths: list[int] = [] |
| 83 | heights: list[int] = [] |
| 84 | for image in images: |
| 85 | if image is None: |
| 86 | continue |
| 87 | widths.append(image.width) |
| 88 | heights.append(image.height) |
| 89 | if not widths or not heights: |
| 90 | raise SystemExit("No sprite content was detected in the provided strip.") |
| 91 | return max(widths), max(heights) |
| 92 | |
| 93 | |
| 94 | def compose_frame( |