mirror of
https://github.com/ciromattia/kcc
synced 2026-09-09 12:27:06 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cdbb4beef | ||
|
|
2c9056c524 | ||
|
|
a503f54f9f |
+1
-1
@@ -780,7 +780,7 @@ Keeping this file may crash some readers like the Kobo native CBZ reader.</strin
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Hold shift while clicking for a higher quality preview.</string>
|
<string>Hold shift while clicking for a low quality preview.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Label Spreads</string>
|
<string>Label Spreads</string>
|
||||||
|
|||||||
@@ -671,9 +671,9 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
GUI.jobList.scrollToBottom()
|
GUI.jobList.scrollToBottom()
|
||||||
|
|
||||||
def labelSpreadsStart(self):
|
def labelSpreadsStart(self):
|
||||||
low_quality_preview = True
|
low_quality_preview = False
|
||||||
if QApplication.keyboardModifiers() == Qt.ShiftModifier:
|
if QApplication.keyboardModifiers() == Qt.ShiftModifier:
|
||||||
low_quality_preview = False
|
low_quality_preview = True
|
||||||
currentJobs = []
|
currentJobs = []
|
||||||
# TODO: make this a function since it's copy pasted
|
# TODO: make this a function since it's copy pasted
|
||||||
for i in range(GUI.jobList.count()):
|
for i in range(GUI.jobList.count()):
|
||||||
@@ -708,19 +708,22 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
# TODO: with statements
|
# TODO: with statements
|
||||||
# TODO: ignore 1% of top and bottom too?
|
# TODO: ignore 1% of top and bottom too?
|
||||||
im1 = Image.open(os.path.join(root, files[i]))
|
im1 = Image.open(os.path.join(root, files[i]))
|
||||||
|
im2 = Image.open(os.path.join(root, files[i+1]))
|
||||||
|
if not options.righttoleft:
|
||||||
|
im1, im2 = im2, im1
|
||||||
size1 = im1.size
|
size1 = im1.size
|
||||||
|
size2 = im2.size
|
||||||
|
|
||||||
preview_crop1 = im1.crop((0, 0, 0.2*size1[0], size1[1]))
|
preview_crop1 = im1.crop((0, 0, 0.2*size1[0], size1[1]))
|
||||||
if low_quality_preview:
|
if low_quality_preview:
|
||||||
preview_crop1 = preview_crop1.convert('1', dither=Dither.NONE)
|
preview_crop1 = preview_crop1.convert('1', dither=Dither.NONE)
|
||||||
calculation_crop1 = im1.crop((0.01*size1[0], 0, 0.04*size1[0], size1[1])).convert('1', dither=Dither.NONE)
|
calculation_crop1 = im1.crop((0.01*size1[0], 0, 0.04*size1[0], size1[1])).convert('1', dither=Dither.NONE)
|
||||||
#crop1 = crop11
|
|
||||||
im2 = Image.open(os.path.join(root, files[i+1]))
|
|
||||||
size2 = im2.size
|
|
||||||
preview_crop2 = im2.crop((0.8*size2[0], 0, size2[0], size2[1]))
|
preview_crop2 = im2.crop((0.8*size2[0], 0, size2[0], size2[1]))
|
||||||
if low_quality_preview:
|
if low_quality_preview:
|
||||||
preview_crop2 = preview_crop2.convert('1', dither=Dither.NONE)
|
preview_crop2 = preview_crop2.convert('1', dither=Dither.NONE)
|
||||||
calculation_crop2 = im2.crop((0.96*size2[0], 0, .99* size2[0], size2[1])).convert('1', dither=Dither.NONE)
|
calculation_crop2 = im2.crop((0.96*size2[0], 0, .99* size2[0], size2[1])).convert('1', dither=Dither.NONE)
|
||||||
#crop2 = crop22
|
|
||||||
# dst = Image.new('1', (im1.width + im2.width, im1.height))
|
# dst = Image.new('1', (im1.width + im2.width, im1.height))
|
||||||
# dst.paste(im2, (0, 0))
|
# dst.paste(im2, (0, 0))
|
||||||
# dst.paste(im1, (im1.width, 0))
|
# dst.paste(im1, (im1.width, 0))
|
||||||
|
|||||||
@@ -861,7 +861,7 @@ class Ui_mainWindow(object):
|
|||||||
self.humbleButton.setText(QCoreApplication.translate("mainWindow", u"Humble Bundle Referral", None))
|
self.humbleButton.setText(QCoreApplication.translate("mainWindow", u"Humble Bundle Referral", None))
|
||||||
self.kofiButton.setText(QCoreApplication.translate("mainWindow", u"Support me on Ko-fi", None))
|
self.kofiButton.setText(QCoreApplication.translate("mainWindow", u"Support me on Ko-fi", None))
|
||||||
#if QT_CONFIG(tooltip)
|
#if QT_CONFIG(tooltip)
|
||||||
self.labelSpreadsButton.setToolTip(QCoreApplication.translate("mainWindow", u"Hold shift while clicking for a higher quality preview.", None))
|
self.labelSpreadsButton.setToolTip(QCoreApplication.translate("mainWindow", u"Hold shift while clicking for a low quality preview.", None))
|
||||||
#endif // QT_CONFIG(tooltip)
|
#endif // QT_CONFIG(tooltip)
|
||||||
self.labelSpreadsButton.setText(QCoreApplication.translate("mainWindow", u"Label Spreads", None))
|
self.labelSpreadsButton.setText(QCoreApplication.translate("mainWindow", u"Label Spreads", None))
|
||||||
#if QT_CONFIG(tooltip)
|
#if QT_CONFIG(tooltip)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
__version__ = '11.0.2'
|
__version__ = '11.0.3'
|
||||||
__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'
|
||||||
|
|||||||
@@ -1859,6 +1859,8 @@ def makeBook(source, qtgui=None, job_progress=''):
|
|||||||
if i in data['spreads']:
|
if i in data['spreads']:
|
||||||
im1 = Image.open(os.path.join(root, sorted_files[i]))
|
im1 = Image.open(os.path.join(root, sorted_files[i]))
|
||||||
im2 = Image.open(os.path.join(root, sorted_files[i+1]))
|
im2 = Image.open(os.path.join(root, sorted_files[i+1]))
|
||||||
|
if not options.righttoleft:
|
||||||
|
im1, im2 = im2, im1
|
||||||
dst = Image.new('RGB', (im1.width + im2.width, im1.height))
|
dst = Image.new('RGB', (im1.width + im2.width, im1.height))
|
||||||
dst.paste(im2, (0, 0))
|
dst.paste(im2, (0, 0))
|
||||||
dst.paste(im1, (im1.width, 0))
|
dst.paste(im1, (im1.width, 0))
|
||||||
|
|||||||
Reference in New Issue
Block a user