From c23af709cf9484e59ced0eeddab5b39b123afa50 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Mon, 20 Oct 2025 23:47:36 -0700 Subject: [PATCH] Revert "webtoon increase minimum vertical blank space threshold" This reverts commit 80ea17ff024f6f16b98844ff33eae472c6e93a86. --- kindlecomicconverter/comic2panel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kindlecomicconverter/comic2panel.py b/kindlecomicconverter/comic2panel.py index 9da3727..90d57b0 100644 --- a/kindlecomicconverter/comic2panel.py +++ b/kindlecomicconverter/comic2panel.py @@ -105,8 +105,8 @@ def splitImage(work): imgOrg = Image.open(filePath).convert('RGB') # I experimented with custom vertical edge kernel [-1, 2, -1] but got poor results imgEdges = Image.open(filePath).convert('L').filter(ImageFilter.FIND_EDGES) - # threshold of 8 is too high. 5 is too low. 6 is OK but 7 is better - imgProcess = imgEdges.point(lambda p: 255 if p > 7 else 0).convert('1', dither=Dither.NONE) + # threshold of 8 is too high. 5 is too low. + imgProcess = imgEdges.point(lambda p: 255 if p > 6 else 0).convert('1', dither=Dither.NONE) widthImg, heightImg = imgOrg.size if heightImg > opt.height: @@ -120,7 +120,7 @@ def splitImage(work): panels = [] # check git history for how these constant values changed h_pad = int(widthImg / 20) - v_pad = int(widthImg / 20) + v_pad = int(widthImg / 80) if v_pad % 2: v_pad += 1 while yWork < heightImg: