From eb968ec16fd80e54c883a1d0a4b86422797e157b Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Sun, 5 Jul 2020 20:09:31 +0200 Subject: [PATCH] Return image data fram get_image() --- software/webradio.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/software/webradio.py b/software/webradio.py index 69636d2..98b6bec 100644 --- a/software/webradio.py +++ b/software/webradio.py @@ -27,8 +27,8 @@ class display(object): def get_image(self): self.img.save("/tmp/wr/frame%d.png" % self.dbg) - self.img.tobytes() self.dbg += 1 + return self.img.tobytes() class display_playback(display): def __init__(self): @@ -112,9 +112,9 @@ class display_manager(object): def get_image(self): if (self.current_display): - self.current_display.get_image() + return self.current_display.get_image() else: - print("TODO: return empty image") + return [] def animate(self, ticks): old_tick = self.tick