1
0
mirror of https://github.com/ciromattia/kcc synced 2026-05-19 14:02:13 +00:00

increase bisect threhold aspect ratio from 1.75 to 1.80 (#1348)

This commit is contained in:
Alex Xu
2026-05-18 21:42:44 -07:00
committed by GitHub
parent 7ceeb29fae
commit f54b06e058

View File

@@ -210,7 +210,8 @@ class ComicPageParser:
# elif wide enough to split
elif (width > height) != (dstwidth > dstheight) and width / height > 1.16:
# if (split) or (split and rotate)
if self.opt.splitter != 1 and width / height < 1.75:
BISECT_THRESHOLD = 1.8
if self.opt.splitter != 1 and width / height < BISECT_THRESHOLD:
if width > height:
leftbox = (0, 0, int(width / 2), height)
rightbox = (int(width / 2), 0, width, height)
@@ -227,7 +228,7 @@ class ComicPageParser:
self.payload.append(['S2', self.source, pagetwo, self.fill])
# if (rotate) or (split and rotate)
if self.opt.splitter > 0 or (self.opt.splitter == 0 and width / height >= 1.75):
if self.opt.splitter > 0 or (self.opt.splitter == 0 and width / height >= BISECT_THRESHOLD):
spread = self.image
if not self.opt.norotate:
if not self.opt.rotateright: