mirror of
https://github.com/ciromattia/kcc
synced 2025-12-12 17:26:23 +00:00
always convert to L
even if workImg.color = False, it could still have color pixels, which can cause problems with quantization
This commit is contained in:
@@ -359,8 +359,7 @@ class ComicPage:
|
||||
self.image = self.image.convert('L')
|
||||
|
||||
def quantizeImage(self):
|
||||
if self.color:
|
||||
self.image = self.image.convert("L").convert("RGB")
|
||||
self.image = self.image.convert("L").convert("RGB")
|
||||
palImg = Image.new('P', (1, 1))
|
||||
palImg.putpalette(self.palette)
|
||||
self.image = self.image.quantize(palette=palImg)
|
||||
|
||||
Reference in New Issue
Block a user