1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-27 16:41:44 +00:00

Fixed Landscape mode with upscaling enabled.

This commit is contained in:
Paweł Jastrzębski
2013-03-04 17:24:11 +01:00
parent 193ad9382c
commit c7f38a574f

View File

@@ -162,6 +162,8 @@ class ComicPage:
ratioDev = float(self.size[0]) / float(self.size[1])
if (float(self.image.size[0]) / float(self.image.size[1])) < ratioDev:
diff = int(self.image.size[1] * ratioDev) - self.image.size[0]
if isSplit and (profile == 'K4' or profile == 'KHD'):
diff = 2
self.image = ImageOps.expand(self.image, border=(diff / 2, 0), fill=fill)
elif (float(self.image.size[0]) / float(self.image.size[1])) > ratioDev:
diff = int(self.image.size[0] / ratioDev) - self.image.size[1]