From b6f3516d4a2a206a35d86c6fe3d2db69ce45694d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kajetan=20Rachwa=C5=82?= Date: Mon, 3 Feb 2025 17:02:40 +0100 Subject: [PATCH] feat: change encoding format to enforced PNG --- src/rai/rai/communication/hri_connector.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rai/rai/communication/hri_connector.py b/src/rai/rai/communication/hri_connector.py index 3cbcf1dab..07380f638 100644 --- a/src/rai/rai/communication/hri_connector.py +++ b/src/rai/rai/communication/hri_connector.py @@ -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: