(image: Image.Image, alpha_threshold: int)
| 60 | |
| 61 | |
| 62 | def crop_to_content(image: Image.Image, alpha_threshold: int) -> Image.Image | None: |
| 63 | bbox = threshold_bbox(image, alpha_threshold) |
| 64 | if bbox is None: |
| 65 | return None |
| 66 | return image.crop(bbox) |
| 67 | |
| 68 | |
| 69 | def split_strip(strip: Image.Image, frames: int) -> list[Image.Image]: |
no test coverage detected