mirror of
https://github.com/ciromattia/kcc
synced 2025-12-15 18:56:28 +00:00
Webtoon mode improvements
This commit is contained in:
@@ -65,9 +65,9 @@ def getImageHistogram(image):
|
|||||||
for i in range(11):
|
for i in range(11):
|
||||||
black += RBGW[i]
|
black += RBGW[i]
|
||||||
if white > black:
|
if white > black:
|
||||||
return 'KCCFW'
|
return False
|
||||||
else:
|
else:
|
||||||
return 'KCCFB'
|
return True
|
||||||
|
|
||||||
|
|
||||||
def getImageFill(image):
|
def getImageFill(image):
|
||||||
@@ -76,8 +76,8 @@ def getImageFill(image):
|
|||||||
imageB = image.crop((0, imageSize[1]-1, imageSize[0], imageSize[1]))
|
imageB = image.crop((0, imageSize[1]-1, imageSize[0], imageSize[1]))
|
||||||
imageT = getImageHistogram(imageT)
|
imageT = getImageHistogram(imageT)
|
||||||
imageB = getImageHistogram(imageB)
|
imageB = getImageHistogram(imageB)
|
||||||
if imageT == imageB:
|
if imageT or imageB:
|
||||||
return imageT
|
return 'KCCFB'
|
||||||
else:
|
else:
|
||||||
return 'KCCFW'
|
return 'KCCFW'
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ def splitImage(work):
|
|||||||
name = work[1]
|
name = work[1]
|
||||||
options = splitImage.options
|
options = splitImage.options
|
||||||
# Harcoded options
|
# Harcoded options
|
||||||
threshold = 0.5
|
threshold = 1.0
|
||||||
delta = 15
|
delta = 15
|
||||||
print ".",
|
print ".",
|
||||||
splitImage.queue.put(".")
|
splitImage.queue.put(".")
|
||||||
|
|||||||
Reference in New Issue
Block a user