1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-15 18:56:28 +00:00

Fixex PNG hotfix

This commit is contained in:
Paweł Jastrzębski
2013-12-07 09:52:20 +01:00
parent 7f5de29174
commit acb4dfad8f

View File

@@ -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()