diff options
| -rwxr-xr-x | kcc/comic2ebook.py | 4 | ||||
| -rwxr-xr-x | kcc/image.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index e16ea4f..3cdc7c9 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -820,10 +820,10 @@ def detectCorruption(tmpPath, orgPath): else: saferRemove(os.path.join(root, name)) if imageSmaller > imageNumber * 0.25 and not options.upscale and not options.stretch: - print("WARNING: More than 1/4 of images are smaller than target device resolution. " + print("WARNING: More than 25% of images are smaller than target device resolution. " "Consider enabling stretching or upscaling to improve readability.") if GUI: - GUI.addMessage.emit('More than 1/4 of images are smaller than target device resolution.', 'warning', False) + GUI.addMessage.emit('More than 25% of images are smaller than target device resolution.', 'warning', False) GUI.addMessage.emit('Consider enabling stretching or upscaling to improve readability.', 'warning', False) GUI.addMessage.emit('', '', False) diff --git a/kcc/image.py b/kcc/image.py index 682ae45..28098e7 100755 --- a/kcc/image.py +++ b/kcc/image.py @@ -119,15 +119,15 @@ class ComicPageParser: def splitCheck(self): width, height = self.image.size dstwidth, dstheight = self.size - # Only split if origin is not oriented the same as target - if (width > height) != (dstwidth > dstheight) and not self.opt.webtoon: + if (width > height) != (dstwidth > dstheight) and width <= dstheight and height <= dstwidth \ + and not self.opt.webtoon: + self.payload.append(['R', self.source, self.image.rotate(90, Image.BICUBIC, True), self.color, self.fill]) + elif (width > height) != (dstwidth > dstheight) and not self.opt.webtoon: if self.opt.splitter != 1: if width > height: - # Source is landscape, so split by the width leftbox = (0, 0, int(width / 2), height) rightbox = (int(width / 2), 0, width, height) else: - # Source is portrait and target is landscape, so split by the height leftbox = (0, 0, width, int(height / 2)) rightbox = (0, int(height / 2), width, height) if self.opt.righttoleft: |