MCPcopy Create free account
hub / github.com/openai/plugins / load_anchor

Function load_anchor

plugins/game-studio/scripts/normalize_sprite_strip.py:112–117  ·  view source on GitHub ↗
(path: str | None, alpha_threshold: int)

Source from the content-addressed store, hash-verified

110
111
112def 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
120def main() -> None:

Callers 1

mainFunction · 0.85

Calls 1

crop_to_contentFunction · 0.85

Tested by

no test coverage detected