From 1b6884ee63756461a005f89de775057270371efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Fri, 12 Jul 2019 21:53:39 +0200 Subject: [PATCH] fixed RGB modes silently depending on RGB images Thanks to @Chris_J_Baird on Twitter reporting the issue: > ColorSSTV.encode_line assuming its gets a tuple from __getpixel__ > had to make the Image.open() do a convert('RGB') https://twitter.com/i/web/status/1149331458189737988 --- pysstv/color.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysstv/color.py b/pysstv/color.py index ef0d161..703240c 100644 --- a/pysstv/color.py +++ b/pysstv/color.py @@ -11,7 +11,7 @@ RED, GREEN, BLUE = range(3) class ColorSSTV(GrayscaleSSTV): def on_init(self): - self.pixels = self.image.load() + self.pixels = self.image.convert('RGB').load() def encode_line(self, line): msec_pixel = self.SCAN / self.WIDTH