1
0
mirror of https://github.com/ciromattia/kcc synced 2026-07-14 08:46:10 +00:00

Apply the correct ordering for image processing (closes #33, thanks to @devernay)

This commit is contained in:
Ciro Mattia Gonano
2013-03-12 16:54:14 +01:00
parent 7a7a2bc10b
commit c2cfc9b8db
2 changed files with 3 additions and 1 deletions
+2
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)