mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 01:36:27 +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')
|
self.image = self.image.convert('L')
|
||||||
|
|
||||||
def quantizeImage(self):
|
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 = Image.new('P', (1, 1))
|
||||||
palImg.putpalette(self.palette)
|
palImg.putpalette(self.palette)
|
||||||
self.image = self.image.quantize(palette=palImg)
|
self.image = self.image.quantize(palette=palImg)
|
||||||
|
|||||||
Reference in New Issue
Block a user