1
0
mirror of https://github.com/ciromattia/kcc synced 2026-02-21 11:39:08 +00:00

Merge branch 'master' into kcc-fakepanelview

Apply PEP-8 codestyle
This commit is contained in:
Ciro Mattia Gonano
2013-03-13 00:20:38 +01:00
3 changed files with 8 additions and 3 deletions

View File

@@ -132,6 +132,8 @@ class ComicPage:
self.image = ImageOps.autocontrast(Image.eval(self.image, lambda a: 255 * (a / 255.) ** gamma))
def quantizeImage(self):
self.image = self.image.convert('L') # convert to grayscale
self.image = self.image.convert("RGB") # convert back to RGB
colors = len(self.palette) / 3
if colors < 256:
self.palette += self.palette[:3] * (256 - colors)