1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-12 17:26:23 +00:00

add L comment

This commit is contained in:
Alex Xu
2025-06-27 11:45:31 -07:00
committed by GitHub
parent 3e4b729a30
commit c7ebb230c2

View File

@@ -359,7 +359,10 @@ class ComicPage:
self.image = self.image.convert('L')
def quantizeImage(self):
# remove all color pixels from image, since colorCheck() has some tolerance
# quantize with a small number of color pixels in a mostly b/w image can have unexpected results
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)