MCPcopy Create free account
hub / github.com/ChenWu98/agent-attack / encode_image

Function encode_image

agent_attack/models/gemini.py:47–50  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

45
46
47def encode_image(image):
48 buffered = BytesIO()
49 image.save(buffered, format="PNG")
50 return buffered.getvalue()
51
52
53def create_prompt_with_image(prompt, image):

Callers 1

create_prompt_with_imageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected