mirror of
https://github.com/ciromattia/kcc
synced 2025-12-15 18:56:28 +00:00
Fixex PNG hotfix
This commit is contained in:
@@ -241,6 +241,9 @@ class ComicPage:
|
||||
|
||||
def calculateBorder(self, sourceImage):
|
||||
if self.fill == 'white':
|
||||
# This code trigger only when sourceImage is already saved. So we can break color quantization.
|
||||
if sourceImage.image.mode == 'P':
|
||||
sourceImage.image = sourceImage.image.convert('RGB')
|
||||
border = ImageChops.invert(sourceImage.image).getbbox()
|
||||
else:
|
||||
border = sourceImage.image.getbbox()
|
||||
|
||||
Reference in New Issue
Block a user