mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 01:36:27 +00:00
Minor tweaks
This commit is contained in:
@@ -292,9 +292,9 @@ class Ui_KCC(object):
|
||||
if enable:
|
||||
if self.currentMode == 1:
|
||||
self.modeBasic()
|
||||
if self.currentMode == 2:
|
||||
elif self.currentMode == 2:
|
||||
self.modeAdvanced()
|
||||
if self.currentMode == 3:
|
||||
elif self.currentMode == 3:
|
||||
self.modeExpert()
|
||||
|
||||
def changeGamma(self, value):
|
||||
|
||||
@@ -260,7 +260,8 @@ class ComicPage:
|
||||
diff -= delta
|
||||
pageNumberCut2 = diff
|
||||
diff += delta
|
||||
oldStat = ImageStat.Stat(self.image.crop((0, heightImg - diff, widthImg, heightImg - pageNumberCut2))).var[0]
|
||||
oldStat = ImageStat.Stat(self.image.crop((0, heightImg - diff, widthImg,
|
||||
heightImg - pageNumberCut2))).var[0]
|
||||
while ImageStat.Stat(self.image.crop((0, heightImg - diff, widthImg, heightImg - pageNumberCut2))).var[0]\
|
||||
< fixedThreshold + oldStat and diff < heightImg / 4:
|
||||
diff += delta
|
||||
@@ -268,8 +269,8 @@ class ComicPage:
|
||||
pageNumberCut3 = diff
|
||||
delta = 5
|
||||
diff = delta
|
||||
while ImageStat.Stat(self.image.crop((0, heightImg - pageNumberCut2, diff, heightImg))).var[0] < fixedThreshold\
|
||||
and diff < widthImg:
|
||||
while ImageStat.Stat(self.image.crop((0, heightImg - pageNumberCut2, diff, heightImg))).var[0]\
|
||||
< fixedThreshold and diff < widthImg:
|
||||
diff += delta
|
||||
diff -= delta
|
||||
pageNumberX1 = diff
|
||||
|
||||
Reference in New Issue
Block a user