MCPcopy Create free account
hub / github.com/Loping151/RoverSign / get_crop_waves_bg

Function get_crop_waves_bg

RoverSign/utils/image.py:21–30  ·  view source on GitHub ↗
(w: int, h: int, bg: str = "bg")

Source from the content-addressed store, hash-verified

19
20
21def get_crop_waves_bg(w: int, h: int, bg: str = "bg") -> Image.Image:
22 img = Image.open(TEXT_PATH / f"{bg}.jpg").convert("RGBA")
23
24 width, height = img.size
25
26 crop_box = (0, height // 2, width, height)
27
28 cropped_image = img.crop(crop_box)
29
30 return crop_center_img(cropped_image, w, h)
31
32
33def get_footer(color: Literal["white", "black", "hakush"] = "white"):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected