Skip to content

Commit

Permalink
feat: change encoding format to enforced PNG
Browse files Browse the repository at this point in the history
  • Loading branch information
rachwalk committed Feb 3, 2025
1 parent 5fb55ad commit b6f3516
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/rai/rai/communication/hri_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ def __repr__(self):

def _image_to_base64(self, image: ImageType) -> str:
buffered = BytesIO()
img_format = image.format if image.format else "PNG"
image.save(buffered, img_format)
image.save(buffered, "PNG")
return base64.b64encode(buffered.getvalue()).decode("utf-8")

def _audio_to_base64(self, audio: AudioSegment) -> str:
Expand Down

0 comments on commit b6f3516

Please sign in to comment.