MCPcopy Create free account
hub / github.com/23japhone/HALO / encode_image

Function encode_image

utils/basic_operation.py:53–55  ·  view source on GitHub ↗
(image_path: str)

Source from the content-addressed store, hash-verified

51
52# image encoding
53def encode_image(image_path: str) -> bytes:
54 with open(image_path, "rb") as image_file:
55 return base64.b64encode(image_file.read()).decode('utf-8')
56
57
58# apikey out of quota

Callers 1

add_responseFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected