MCPcopy Create free account
hub / github.com/Francis-Rings/FlashPortrait / get_image

Function get_image

wan/utils/utils.py:343–350  ·  view source on GitHub ↗
(ref_image=None)

Source from the content-addressed store, hash-verified

341 return ref_image
342
343def get_image(ref_image=None):
344 if ref_image is not None:
345 if isinstance(ref_image, str):
346 ref_image = Image.open(ref_image).convert("RGB")
347 elif isinstance(ref_image, Image.Image):
348 ref_image = ref_image.convert("RGB")
349
350 return ref_image
351
352def padding_image(images, new_width, new_height):
353 new_image = Image.new('RGB', (new_width, new_height), (255, 255, 255))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected