(path: str | None, alpha_threshold: int)
| 110 | |
| 111 | |
| 112 | def load_anchor(path: str | None, alpha_threshold: int) -> tuple[Image.Image | None, Image.Image | None]: |
| 113 | if path is None: |
| 114 | return None, None |
| 115 | anchor = Image.open(path).convert("RGBA") |
| 116 | cropped = crop_to_content(anchor, alpha_threshold) |
| 117 | return anchor, cropped |
| 118 | |
| 119 | |
| 120 | def main() -> None: |
no test coverage detected