mirror of
https://github.com/ciromattia/kcc
synced 2026-09-20 01:37:09 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9752b50cc3 | ||
|
|
19eda3aad2 |
@@ -1,4 +1,4 @@
|
|||||||
__version__ = '11.3.1'
|
__version__ = '11.3.2'
|
||||||
__license__ = 'ISC'
|
__license__ = 'ISC'
|
||||||
__copyright__ = '2012-2022, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>, darodi'
|
__copyright__ = '2012-2022, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>, darodi'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|||||||
@@ -686,10 +686,13 @@ def imgDirectoryProcessing(path, job_progress=''):
|
|||||||
options.imgMetadata = {}
|
options.imgMetadata = {}
|
||||||
work = []
|
work = []
|
||||||
pagenumber = 0
|
pagenumber = 0
|
||||||
|
is_first_page = True
|
||||||
for dirpath, _, filenames in os.walk(path):
|
for dirpath, _, filenames in os.walk(path):
|
||||||
for afile in filenames:
|
for afile in os_sorted(filenames):
|
||||||
pagenumber += 1
|
pagenumber += 1
|
||||||
work.append([afile, dirpath, options])
|
work.append([afile, dirpath, options, is_first_page])
|
||||||
|
if is_first_page:
|
||||||
|
is_first_page = False
|
||||||
if GUI:
|
if GUI:
|
||||||
GUI.progressBarTick.emit(str(pagenumber))
|
GUI.progressBarTick.emit(str(pagenumber))
|
||||||
if len(work) > 0:
|
if len(work) > 0:
|
||||||
@@ -734,16 +737,20 @@ def imgFileProcessing(work):
|
|||||||
afile = work[0]
|
afile = work[0]
|
||||||
dirpath = work[1]
|
dirpath = work[1]
|
||||||
opt = work[2]
|
opt = work[2]
|
||||||
|
is_first_page = work[3]
|
||||||
output = []
|
output = []
|
||||||
workImg = image.ComicPageParser((dirpath, afile), opt)
|
workImg = image.ComicPageParser((dirpath, afile), opt)
|
||||||
for i in workImg.payload:
|
for i in workImg.payload:
|
||||||
img = image.ComicPage(opt, *i)
|
img = image.ComicPage(opt, *i)
|
||||||
if opt.cropping == 2 and not opt.webtoon:
|
if is_first_page and img.color:
|
||||||
img.cropPageNumber(opt.croppingp, opt.croppingm)
|
pass
|
||||||
if opt.cropping == 1 and not opt.webtoon:
|
else:
|
||||||
img.cropMargin(opt.croppingp, opt.croppingm)
|
if opt.cropping == 2 and not opt.webtoon:
|
||||||
if opt.interpanelcrop > 0:
|
img.cropPageNumber(opt.croppingp, opt.croppingm)
|
||||||
img.cropInterPanelEmptySections("horizontal" if opt.interpanelcrop == 1 else "both")
|
if opt.cropping == 1 and not opt.webtoon:
|
||||||
|
img.cropMargin(opt.croppingp, opt.croppingm)
|
||||||
|
if opt.interpanelcrop > 0:
|
||||||
|
img.cropInterPanelEmptySections("horizontal" if opt.interpanelcrop == 1 else "both")
|
||||||
|
|
||||||
img.gammaCorrectImage()
|
img.gammaCorrectImage()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user