MCPcopy Create free account
hub / github.com/IDEA-Research/T-Rex / encode_image

Function encode_image

trex/model_wrapper.py:12–36  ·  view source on GitHub ↗

Encodes an image to a base64 string. Args: image (str or PIL.Image.Image): The image to encode. - If str: should be a valid image file path. - If PIL.Image.Image: image will be encoded from memory. Returns: str: Base64-encoded image string.

(image)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

convert_visual_promptMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected