MCPcopy
hub / github.com/treeverse/dvc / _encode_image

Method _encode_image

dvc/render/converter/image.py:31–33  ·  view source on GitHub ↗
(image_data: bytes)

Source from the content-addressed store, hash-verified

29
30 @staticmethod
31 def _encode_image(image_data: bytes) -> str:
32 base64_str = base64.b64encode(image_data).decode()
33 return f"data:image;base64,{base64_str}"
34
35 def convert(self) -> tuple[list[tuple[str, str, Any]], dict]:
36 datas = []

Callers 2

flat_datapointsMethod · 0.95

Calls

no outgoing calls

Tested by 1