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
pull/19/head
András Veres-Szentkirályi 2019-07-12 21:53:39 +02:00
rodzic e220d1964c
commit 1b6884ee63
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -11,7 +11,7 @@ RED, GREEN, BLUE = range(3)
class ColorSSTV(GrayscaleSSTV): class ColorSSTV(GrayscaleSSTV):
def on_init(self): def on_init(self):
self.pixels = self.image.load() self.pixels = self.image.convert('RGB').load()
def encode_line(self, line): def encode_line(self, line):
msec_pixel = self.SCAN / self.WIDTH msec_pixel = self.SCAN / self.WIDTH