decode custom messages prof

This commit is contained in:
Justin 2023-04-19 19:08:12 +08:00 committed by GitHub
parent 665af640b9
commit 84aba5eb4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -789,6 +789,8 @@ class StockTicker():
r,g,b = colours[message['text_colour']] r,g,b = colours[message['text_colour']]
background = colours[message['background_colour']] background = colours[message['background_colour']]
decoded = message['text'].encode("ascii","ignore")
message['text'] = decoded.decode()
msg_img = self.textImage(message['text'], font, int(r), int(g), int(b), True, w_buff = 11, background = background, location = location) msg_img = self.textImage(message['text'], font, int(r), int(g), int(b), True, w_buff = 11, background = background, location = location)
img = Image.new('RGB', (msg_img.size[0] + 5, 32)) img = Image.new('RGB', (msg_img.size[0] + 5, 32))