MCPcopy Index your code
hub / github.com/modelscope/modelscope / decode_base64_to_image

Function decode_base64_to_image

modelscope/utils/input_output.py:569–576  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

567
568
569def decode_base64_to_image(content):
570 if content.startswith('http') or content.startswith(
571 'oss') or os.path.exists(content):
572 return content
573
574 from PIL import Image
575 image_file_content = base64.b64decode(content, '-_')
576 return Image.open(BytesIO(image_file_content))
577
578
579def decode_base64_to_audio(content):

Callers

nothing calls this directly

Calls 2

openMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…