From 317fb33fd0b6646565f60312de32caec38d563e0 Mon Sep 17 00:00:00 2001
From: Alex Xu
Date: Fri, 3 Jan 2025 19:43:20 -0800
Subject: [PATCH] No Rotate option (#785)
* no rotate
* Revert "no rotate"
This reverts commit b6f1fe888272e56d138c1a2936124cc48ca7288b.
* implement norotate
---
README.md | 1 +
gui/KCC.ui | 238 +++++++++++++++-------------
kindlecomicconverter/KCC_gui.py | 3 +
kindlecomicconverter/KCC_ui.py | 221 +++++++++++++-------------
kindlecomicconverter/comic2ebook.py | 2 +
kindlecomicconverter/image.py | 10 +-
6 files changed, 253 insertions(+), 222 deletions(-)
diff --git a/README.md b/README.md
index 6379b8e..592f874 100644
--- a/README.md
+++ b/README.md
@@ -184,6 +184,7 @@ OUTPUT SETTINGS:
-b BATCHSPLIT, --batchsplit BATCHSPLIT
Split output into multiple files. 0: Don't split 1: Automatic mode 2: Consider every subdirectory as separate volume [Default=0]
--spreadshift Shift first page to opposite side in landscape for two page spread alignment
+ --norotate Do not rotate double page spreads in spread splitter option.
CUSTOM PROFILE:
--customwidth CUSTOMWIDTH
diff --git a/gui/KCC.ui b/gui/KCC.ui
index e9a3e2f..57e3bfc 100644
--- a/gui/KCC.ui
+++ b/gui/KCC.ui
@@ -37,49 +37,6 @@
0
- -
-
-
- <html><head/><body><p style='white-space:pre'><span style=" font-weight:600; text-decoration: underline;">Unchecked - 4 panels<br/></span>Zoom each corner separately.</p><p style='white-space:pre'><span style=" font-weight:600; text-decoration: underline;">Indeterminate - 2 panels<br/></span>Zoom only the top and bottom of the page.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - 4 high-quality panels<br/></span>Zoom each corner separately. Try to increase the quality of magnification. Check wiki for more details.</p></body></html>
-
-
- Panel View 4/2/HQ
-
-
- true
-
-
-
- -
-
-
- Delete input file(s) or directory. It's not recoverable!
-
-
- Delete input
-
-
-
- -
-
-
- <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - 1x4<br/></span>Keep format 1x4 panels strips.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - 2x2<br/></span>Turn 1x4 strips to 2x2 to maximize screen usage.</p></body></html>
-
-
- 1x4 to 2x2 strips
-
-
-
- -
-
-
- <html><head/><body><p style='white-space:pre'>Disable automatic gamma correction.</p></body></html>
-
-
- Custom gamma
-
-
-
-
@@ -93,72 +50,13 @@
- -
-
+
-
+
- <html><head/><body><p style='white-space:pre'>Enable special parsing mode for Korean Webtoons.</p></body></html>
+ <html><head/><body><pre style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Do not process any image, ignore profile and processing options</pre></body></html>
- Webtoon mode
-
-
-
- -
-
-
- <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Nothing<br/></span>Images smaller than device resolution will not be resized.</p><p><span style=" font-weight:600; text-decoration: underline;">Indeterminate - Stretching<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Upscaling<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be preserved.</p></body></html>
-
-
- Stretch/Upscale
-
-
- true
-
-
-
- -
-
-
- <html><head/><body><p style='white-space:pre'>Enable right-to-left reading.</p></body></html>
-
-
- Manga mode
-
-
-
- -
-
-
- <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Split<br/></span>Double page spreads will be cut into two separate pages.</p><p><span style=" font-weight:600; text-decoration: underline;">Indeterminate - Rotate and split<br/></span>Double page spreads will be displayed twice. First rotated and then split. </p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Rotate<br/></span>Double page spreads will be rotated.</p></body></html>
-
-
- Spread splitter
-
-
- true
-
-
-
- -
-
-
- <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Disabled</span></p><p>Disabled</p><p><span style=" font-weight:600; text-decoration: underline;">Indeterminate - Margins<br/></span>Margins</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Margins + page numbers<br/></span>Margins +page numbers</p></body></html>
-
-
- Cropping mode
-
-
- true
-
-
-
- -
-
-
- <html><head/><body><p style='white-space:pre'><span style=" font-weight:600; text-decoration: underline;">Unchecked - Automatic mode<br/></span>The output will be split automatically.</p><p style='white-space:pre'><span style=" font-weight:600; text-decoration: underline;">Checked - Volume mode<br/></span>Every subdirectory will be considered as a separate volume.</p></body></html>
-
-
- Output split
+ Disable processing
@@ -175,6 +73,59 @@
+ -
+
+
+ Shift first page to opposite side in landscape for two page spread alignment
+
+
+ Spread shift
+
+
+
+ -
+
+
+ <html><head/><body><p style='white-space:pre'>Enable special parsing mode for Korean Webtoons.</p></body></html>
+
+
+ Webtoon mode
+
+
+
+ -
+
+
+ <html><head/><body><p style='white-space:pre'><span style=" font-weight:600; text-decoration: underline;">Unchecked - 4 panels<br/></span>Zoom each corner separately.</p><p style='white-space:pre'><span style=" font-weight:600; text-decoration: underline;">Indeterminate - 2 panels<br/></span>Zoom only the top and bottom of the page.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - 4 high-quality panels<br/></span>Zoom each corner separately. Try to increase the quality of magnification. Check wiki for more details.</p></body></html>
+
+
+ Panel View 4/2/HQ
+
+
+ true
+
+
+
+ -
+
+
+ <html><head/><body><p style='white-space:pre'><span style=" font-weight:600; text-decoration: underline;">Unchecked - Automatic mode<br/></span>The output will be split automatically.</p><p style='white-space:pre'><span style=" font-weight:600; text-decoration: underline;">Checked - Volume mode<br/></span>Every subdirectory will be considered as a separate volume.</p></body></html>
+
+
+ Output split
+
+
+
+ -
+
+
+ Delete input file(s) or directory. It's not recoverable!
+
+
+ Delete input
+
+
+
-
@@ -185,23 +136,82 @@
- -
-
+
-
+
- <html><head/><body><pre style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Do not process any image, ignore profile and processing options</pre></body></html>
+ <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - 1x4<br/></span>Keep format 1x4 panels strips.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - 2x2<br/></span>Turn 1x4 strips to 2x2 to maximize screen usage.</p></body></html>
- Disable processing
+ 1x4 to 2x2 strips
- -
-
+
-
+
- Shift first page to opposite side in landscape for two page spread alignment
+ <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Nothing<br/></span>Images smaller than device resolution will not be resized.</p><p><span style=" font-weight:600; text-decoration: underline;">Indeterminate - Stretching<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be not preserved.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Upscaling<br/></span>Images smaller than device resolution will be resized. Aspect ratio will be preserved.</p></body></html>
- Spread shift
+ Stretch/Upscale
+
+
+ true
+
+
+
+ -
+
+
+ <html><head/><body><p style='white-space:pre'>Disable automatic gamma correction.</p></body></html>
+
+
+ Custom gamma
+
+
+
+ -
+
+
+ <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Disabled</span></p><p>Disabled</p><p><span style=" font-weight:600; text-decoration: underline;">Indeterminate - Margins<br/></span>Margins</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Margins + page numbers<br/></span>Margins +page numbers</p></body></html>
+
+
+ Cropping mode
+
+
+ true
+
+
+
+ -
+
+
+ <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Split<br/></span>Double page spreads will be cut into two separate pages.</p><p><span style=" font-weight:600; text-decoration: underline;">Indeterminate - Rotate and split<br/></span>Double page spreads will be displayed twice. First rotated and then split. </p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Rotate<br/></span>Double page spreads will be rotated.</p></body></html>
+
+
+ Spread splitter
+
+
+ true
+
+
+
+ -
+
+
+ <html><head/><body><p style='white-space:pre'>Enable right-to-left reading.</p></body></html>
+
+
+ Manga mode
+
+
+
+ -
+
+
+ Do not rotate double page spreads in spread splitter option.
+
+
+ No rotate
diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py
index 28056b7..c84dd0a 100644
--- a/kindlecomicconverter/KCC_gui.py
+++ b/kindlecomicconverter/KCC_gui.py
@@ -258,6 +258,8 @@ class WorkerThread(QtCore.QThread):
options.delete = True
if GUI.spreadShiftBox.isChecked():
options.spreadshift = True
+ if GUI.noRotateBox.isChecked():
+ options.norotate = True
if GUI.mozJpegBox.checkState() == Qt.CheckState.PartiallyChecked:
options.forcepng = True
elif GUI.mozJpegBox.checkState() == Qt.CheckState.Checked:
@@ -794,6 +796,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
'heightBox': GUI.heightBox.value(),
'deleteBox': GUI.deleteBox.checkState().value,
'spreadShiftBox': GUI.spreadShiftBox.checkState().value,
+ 'noRotateBox': GUI.noRotateBox.checkState().value,
'maximizeStrips': GUI.maximizeStrips.checkState().value,
'gammaSlider': float(self.gammaValue) * 100})
self.settings.sync()
diff --git a/kindlecomicconverter/KCC_ui.py b/kindlecomicconverter/KCC_ui.py
index 14e5628..c0fe799 100644
--- a/kindlecomicconverter/KCC_ui.py
+++ b/kindlecomicconverter/KCC_ui.py
@@ -40,65 +40,16 @@ class Ui_mainWindow(object):
self.gridLayout_2 = QGridLayout(self.optionWidget)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
- self.qualityBox = QCheckBox(self.optionWidget)
- self.qualityBox.setObjectName(u"qualityBox")
- self.qualityBox.setTristate(True)
-
- self.gridLayout_2.addWidget(self.qualityBox, 0, 2, 1, 1)
-
- self.deleteBox = QCheckBox(self.optionWidget)
- self.deleteBox.setObjectName(u"deleteBox")
-
- self.gridLayout_2.addWidget(self.deleteBox, 4, 1, 1, 1)
-
- self.maximizeStrips = QCheckBox(self.optionWidget)
- self.maximizeStrips.setObjectName(u"maximizeStrips")
-
- self.gridLayout_2.addWidget(self.maximizeStrips, 3, 1, 1, 1)
-
- self.gammaBox = QCheckBox(self.optionWidget)
- self.gammaBox.setObjectName(u"gammaBox")
-
- self.gridLayout_2.addWidget(self.gammaBox, 1, 2, 1, 1)
-
self.borderBox = QCheckBox(self.optionWidget)
self.borderBox.setObjectName(u"borderBox")
self.borderBox.setTristate(True)
self.gridLayout_2.addWidget(self.borderBox, 2, 0, 1, 1)
- self.webtoonBox = QCheckBox(self.optionWidget)
- self.webtoonBox.setObjectName(u"webtoonBox")
+ self.disableProcessingBox = QCheckBox(self.optionWidget)
+ self.disableProcessingBox.setObjectName(u"disableProcessingBox")
- self.gridLayout_2.addWidget(self.webtoonBox, 1, 0, 1, 1)
-
- self.upscaleBox = QCheckBox(self.optionWidget)
- self.upscaleBox.setObjectName(u"upscaleBox")
- self.upscaleBox.setTristate(True)
-
- self.gridLayout_2.addWidget(self.upscaleBox, 1, 1, 1, 1)
-
- self.mangaBox = QCheckBox(self.optionWidget)
- self.mangaBox.setObjectName(u"mangaBox")
-
- self.gridLayout_2.addWidget(self.mangaBox, 0, 0, 1, 1)
-
- self.rotateBox = QCheckBox(self.optionWidget)
- self.rotateBox.setObjectName(u"rotateBox")
- self.rotateBox.setTristate(True)
-
- self.gridLayout_2.addWidget(self.rotateBox, 0, 1, 1, 1)
-
- self.croppingBox = QCheckBox(self.optionWidget)
- self.croppingBox.setObjectName(u"croppingBox")
- self.croppingBox.setTristate(True)
-
- self.gridLayout_2.addWidget(self.croppingBox, 3, 2, 1, 1)
-
- self.outputSplit = QCheckBox(self.optionWidget)
- self.outputSplit.setObjectName(u"outputSplit")
-
- self.gridLayout_2.addWidget(self.outputSplit, 2, 1, 1, 1)
+ self.gridLayout_2.addWidget(self.disableProcessingBox, 4, 2, 1, 1)
self.mozJpegBox = QCheckBox(self.optionWidget)
self.mozJpegBox.setObjectName(u"mozJpegBox")
@@ -106,20 +57,74 @@ class Ui_mainWindow(object):
self.gridLayout_2.addWidget(self.mozJpegBox, 3, 0, 1, 1)
+ self.spreadShiftBox = QCheckBox(self.optionWidget)
+ self.spreadShiftBox.setObjectName(u"spreadShiftBox")
+
+ self.gridLayout_2.addWidget(self.spreadShiftBox, 4, 0, 1, 1)
+
+ self.webtoonBox = QCheckBox(self.optionWidget)
+ self.webtoonBox.setObjectName(u"webtoonBox")
+
+ self.gridLayout_2.addWidget(self.webtoonBox, 1, 0, 1, 1)
+
+ self.qualityBox = QCheckBox(self.optionWidget)
+ self.qualityBox.setObjectName(u"qualityBox")
+ self.qualityBox.setTristate(True)
+
+ self.gridLayout_2.addWidget(self.qualityBox, 0, 2, 1, 1)
+
+ self.outputSplit = QCheckBox(self.optionWidget)
+ self.outputSplit.setObjectName(u"outputSplit")
+
+ self.gridLayout_2.addWidget(self.outputSplit, 2, 1, 1, 1)
+
+ self.deleteBox = QCheckBox(self.optionWidget)
+ self.deleteBox.setObjectName(u"deleteBox")
+
+ self.gridLayout_2.addWidget(self.deleteBox, 4, 1, 1, 1)
+
self.colorBox = QCheckBox(self.optionWidget)
self.colorBox.setObjectName(u"colorBox")
self.gridLayout_2.addWidget(self.colorBox, 2, 2, 1, 1)
- self.disableProcessingBox = QCheckBox(self.optionWidget)
- self.disableProcessingBox.setObjectName(u"disableProcessingBox")
+ self.maximizeStrips = QCheckBox(self.optionWidget)
+ self.maximizeStrips.setObjectName(u"maximizeStrips")
- self.gridLayout_2.addWidget(self.disableProcessingBox, 4, 2, 1, 1)
+ self.gridLayout_2.addWidget(self.maximizeStrips, 3, 1, 1, 1)
- self.spreadShiftBox = QCheckBox(self.optionWidget)
- self.spreadShiftBox.setObjectName(u"spreadShiftBox")
+ self.upscaleBox = QCheckBox(self.optionWidget)
+ self.upscaleBox.setObjectName(u"upscaleBox")
+ self.upscaleBox.setTristate(True)
- self.gridLayout_2.addWidget(self.spreadShiftBox, 4, 0, 1, 1)
+ self.gridLayout_2.addWidget(self.upscaleBox, 1, 1, 1, 1)
+
+ self.gammaBox = QCheckBox(self.optionWidget)
+ self.gammaBox.setObjectName(u"gammaBox")
+
+ self.gridLayout_2.addWidget(self.gammaBox, 1, 2, 1, 1)
+
+ self.croppingBox = QCheckBox(self.optionWidget)
+ self.croppingBox.setObjectName(u"croppingBox")
+ self.croppingBox.setTristate(True)
+
+ self.gridLayout_2.addWidget(self.croppingBox, 3, 2, 1, 1)
+
+ self.rotateBox = QCheckBox(self.optionWidget)
+ self.rotateBox.setObjectName(u"rotateBox")
+ self.rotateBox.setTristate(True)
+
+ self.gridLayout_2.addWidget(self.rotateBox, 0, 1, 1, 1)
+
+ self.mangaBox = QCheckBox(self.optionWidget)
+ self.mangaBox.setObjectName(u"mangaBox")
+
+ self.gridLayout_2.addWidget(self.mangaBox, 0, 0, 1, 1)
+
+ self.noRotateBox = QCheckBox(self.optionWidget)
+ self.noRotateBox.setObjectName(u"noRotateBox")
+
+ self.gridLayout_2.addWidget(self.noRotateBox, 5, 1, 1, 1)
self.gridLayout.addWidget(self.optionWidget, 5, 0, 1, 2)
@@ -359,66 +364,70 @@ class Ui_mainWindow(object):
def retranslateUi(self, mainWindow):
mainWindow.setWindowTitle(QCoreApplication.translate("mainWindow", u"Kindle Comic Converter", None))
-#if QT_CONFIG(tooltip)
- self.qualityBox.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - 4 panels
Zoom each corner separately.
Indeterminate - 2 panels
Zoom only the top and bottom of the page.
Checked - 4 high-quality panels
Zoom each corner separately. Try to increase the quality of magnification. Check wiki for more details.
", None))
-#endif // QT_CONFIG(tooltip)
- self.qualityBox.setText(QCoreApplication.translate("mainWindow", u"Panel View 4/2/HQ", None))
-#if QT_CONFIG(tooltip)
- self.deleteBox.setToolTip(QCoreApplication.translate("mainWindow", u"Delete input file(s) or directory. It's not recoverable!", None))
-#endif // QT_CONFIG(tooltip)
- self.deleteBox.setText(QCoreApplication.translate("mainWindow", u"Delete input", None))
-#if QT_CONFIG(tooltip)
- self.maximizeStrips.setToolTip(QCoreApplication.translate("mainWindow", u" Unchecked - 1x4
Keep format 1x4 panels strips.
Checked - 2x2
Turn 1x4 strips to 2x2 to maximize screen usage.
", None))
-#endif // QT_CONFIG(tooltip)
- self.maximizeStrips.setText(QCoreApplication.translate("mainWindow", u"1x4 to 2x2 strips", None))
-#if QT_CONFIG(tooltip)
- self.gammaBox.setToolTip(QCoreApplication.translate("mainWindow", u"Disable automatic gamma correction.
", None))
-#endif // QT_CONFIG(tooltip)
- self.gammaBox.setText(QCoreApplication.translate("mainWindow", u"Custom gamma", None))
#if QT_CONFIG(tooltip)
self.borderBox.setToolTip(QCoreApplication.translate("mainWindow", u" Unchecked - Autodetection
The color of margins fill will be detected automatically.
Indeterminate - White
Margins will be filled with white color.
Checked - Black
Margins will be filled with black color.
", None))
#endif // QT_CONFIG(tooltip)
self.borderBox.setText(QCoreApplication.translate("mainWindow", u"W/B margins", None))
-#if QT_CONFIG(tooltip)
- self.webtoonBox.setToolTip(QCoreApplication.translate("mainWindow", u"
Enable special parsing mode for Korean Webtoons.
", None))
-#endif // QT_CONFIG(tooltip)
- self.webtoonBox.setText(QCoreApplication.translate("mainWindow", u"Webtoon mode", None))
-#if QT_CONFIG(tooltip)
- self.upscaleBox.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - Nothing
Images smaller than device resolution will not be resized.
Indeterminate - Stretching
Images smaller than device resolution will be resized. Aspect ratio will be not preserved.
Checked - Upscaling
Images smaller than device resolution will be resized. Aspect ratio will be preserved.
", None))
-#endif // QT_CONFIG(tooltip)
- self.upscaleBox.setText(QCoreApplication.translate("mainWindow", u"Stretch/Upscale", None))
-#if QT_CONFIG(tooltip)
- self.mangaBox.setToolTip(QCoreApplication.translate("mainWindow", u"Enable right-to-left reading.
", None))
-#endif // QT_CONFIG(tooltip)
- self.mangaBox.setText(QCoreApplication.translate("mainWindow", u"Manga mode", None))
-#if QT_CONFIG(tooltip)
- self.rotateBox.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - Split
Double page spreads will be cut into two separate pages.
Indeterminate - Rotate and split
Double page spreads will be displayed twice. First rotated and then split.
Checked - Rotate
Double page spreads will be rotated.
", None))
-#endif // QT_CONFIG(tooltip)
- self.rotateBox.setText(QCoreApplication.translate("mainWindow", u"Spread splitter", None))
-#if QT_CONFIG(tooltip)
- self.croppingBox.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - Disabled
Disabled
Indeterminate - Margins
Margins
Checked - Margins + page numbers
Margins +page numbers
", None))
-#endif // QT_CONFIG(tooltip)
- self.croppingBox.setText(QCoreApplication.translate("mainWindow", u"Cropping mode", None))
-#if QT_CONFIG(tooltip)
- self.outputSplit.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - Automatic mode
The output will be split automatically.
Checked - Volume mode
Every subdirectory will be considered as a separate volume.
", None))
-#endif // QT_CONFIG(tooltip)
- self.outputSplit.setText(QCoreApplication.translate("mainWindow", u"Output split", None))
-#if QT_CONFIG(tooltip)
- self.mozJpegBox.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - JPEG
Use JPEG files
Indeterminate - force PNG
Create PNG files instead JPEG
Checked - mozJpeg
10-20% smaller JPEG file, with the same image quality, but processing time multiplied by 2
", None))
-#endif // QT_CONFIG(tooltip)
- self.mozJpegBox.setText(QCoreApplication.translate("mainWindow", u"JPEG/PNG/mozJpeg", None))
-#if QT_CONFIG(tooltip)
- self.colorBox.setToolTip(QCoreApplication.translate("mainWindow", u"Disable conversion to grayscale.
", None))
-#endif // QT_CONFIG(tooltip)
- self.colorBox.setText(QCoreApplication.translate("mainWindow", u"Color mode", None))
#if QT_CONFIG(tooltip)
self.disableProcessingBox.setToolTip(QCoreApplication.translate("mainWindow", u"Do not process any image, ignore profile and processing options
", None))
#endif // QT_CONFIG(tooltip)
self.disableProcessingBox.setText(QCoreApplication.translate("mainWindow", u"Disable processing", None))
+#if QT_CONFIG(tooltip)
+ self.mozJpegBox.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - JPEG
Use JPEG files
Indeterminate - force PNG
Create PNG files instead JPEG
Checked - mozJpeg
10-20% smaller JPEG file, with the same image quality, but processing time multiplied by 2
", None))
+#endif // QT_CONFIG(tooltip)
+ self.mozJpegBox.setText(QCoreApplication.translate("mainWindow", u"JPEG/PNG/mozJpeg", None))
#if QT_CONFIG(tooltip)
self.spreadShiftBox.setToolTip(QCoreApplication.translate("mainWindow", u"Shift first page to opposite side in landscape for two page spread alignment", None))
#endif // QT_CONFIG(tooltip)
self.spreadShiftBox.setText(QCoreApplication.translate("mainWindow", u"Spread shift", None))
+#if QT_CONFIG(tooltip)
+ self.webtoonBox.setToolTip(QCoreApplication.translate("mainWindow", u"Enable special parsing mode for Korean Webtoons.
", None))
+#endif // QT_CONFIG(tooltip)
+ self.webtoonBox.setText(QCoreApplication.translate("mainWindow", u"Webtoon mode", None))
+#if QT_CONFIG(tooltip)
+ self.qualityBox.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - 4 panels
Zoom each corner separately.
Indeterminate - 2 panels
Zoom only the top and bottom of the page.
Checked - 4 high-quality panels
Zoom each corner separately. Try to increase the quality of magnification. Check wiki for more details.
", None))
+#endif // QT_CONFIG(tooltip)
+ self.qualityBox.setText(QCoreApplication.translate("mainWindow", u"Panel View 4/2/HQ", None))
+#if QT_CONFIG(tooltip)
+ self.outputSplit.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - Automatic mode
The output will be split automatically.
Checked - Volume mode
Every subdirectory will be considered as a separate volume.
", None))
+#endif // QT_CONFIG(tooltip)
+ self.outputSplit.setText(QCoreApplication.translate("mainWindow", u"Output split", None))
+#if QT_CONFIG(tooltip)
+ self.deleteBox.setToolTip(QCoreApplication.translate("mainWindow", u"Delete input file(s) or directory. It's not recoverable!", None))
+#endif // QT_CONFIG(tooltip)
+ self.deleteBox.setText(QCoreApplication.translate("mainWindow", u"Delete input", None))
+#if QT_CONFIG(tooltip)
+ self.colorBox.setToolTip(QCoreApplication.translate("mainWindow", u"Disable conversion to grayscale.
", None))
+#endif // QT_CONFIG(tooltip)
+ self.colorBox.setText(QCoreApplication.translate("mainWindow", u"Color mode", None))
+#if QT_CONFIG(tooltip)
+ self.maximizeStrips.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - 1x4
Keep format 1x4 panels strips.
Checked - 2x2
Turn 1x4 strips to 2x2 to maximize screen usage.
", None))
+#endif // QT_CONFIG(tooltip)
+ self.maximizeStrips.setText(QCoreApplication.translate("mainWindow", u"1x4 to 2x2 strips", None))
+#if QT_CONFIG(tooltip)
+ self.upscaleBox.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - Nothing
Images smaller than device resolution will not be resized.
Indeterminate - Stretching
Images smaller than device resolution will be resized. Aspect ratio will be not preserved.
Checked - Upscaling
Images smaller than device resolution will be resized. Aspect ratio will be preserved.
", None))
+#endif // QT_CONFIG(tooltip)
+ self.upscaleBox.setText(QCoreApplication.translate("mainWindow", u"Stretch/Upscale", None))
+#if QT_CONFIG(tooltip)
+ self.gammaBox.setToolTip(QCoreApplication.translate("mainWindow", u"Disable automatic gamma correction.
", None))
+#endif // QT_CONFIG(tooltip)
+ self.gammaBox.setText(QCoreApplication.translate("mainWindow", u"Custom gamma", None))
+#if QT_CONFIG(tooltip)
+ self.croppingBox.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - Disabled
Disabled
Indeterminate - Margins
Margins
Checked - Margins + page numbers
Margins +page numbers
", None))
+#endif // QT_CONFIG(tooltip)
+ self.croppingBox.setText(QCoreApplication.translate("mainWindow", u"Cropping mode", None))
+#if QT_CONFIG(tooltip)
+ self.rotateBox.setToolTip(QCoreApplication.translate("mainWindow", u"Unchecked - Split
Double page spreads will be cut into two separate pages.
Indeterminate - Rotate and split
Double page spreads will be displayed twice. First rotated and then split.
Checked - Rotate
Double page spreads will be rotated.
", None))
+#endif // QT_CONFIG(tooltip)
+ self.rotateBox.setText(QCoreApplication.translate("mainWindow", u"Spread splitter", None))
+#if QT_CONFIG(tooltip)
+ self.mangaBox.setToolTip(QCoreApplication.translate("mainWindow", u"Enable right-to-left reading.
", None))
+#endif // QT_CONFIG(tooltip)
+ self.mangaBox.setText(QCoreApplication.translate("mainWindow", u"Manga mode", None))
+#if QT_CONFIG(tooltip)
+ self.noRotateBox.setToolTip(QCoreApplication.translate("mainWindow", u"Do not rotate double page spreads in spread splitter option.", None))
+#endif // QT_CONFIG(tooltip)
+ self.noRotateBox.setText(QCoreApplication.translate("mainWindow", u"No rotate", None))
self.gammaLabel.setText(QCoreApplication.translate("mainWindow", u"Gamma: Auto", None))
self.croppingPowerLabel.setText(QCoreApplication.translate("mainWindow", u"Cropping power:", None))
#if QT_CONFIG(tooltip)
diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py
index 6dc1554..81cf130 100755
--- a/kindlecomicconverter/comic2ebook.py
+++ b/kindlecomicconverter/comic2ebook.py
@@ -994,6 +994,8 @@ def makeParser():
"2: Consider every subdirectory as separate volume [Default=0]")
output_options.add_argument("--spreadshift", action="store_true", dest="spreadshift", default=False,
help="Shift first page to opposite side in landscape for spread alignment")
+ output_options.add_argument("--norotate", action="store_true", dest="norotate", default=False,
+ help="Do not rotate double page spreads in spread splitter option.")
processing_options.add_argument("-n", "--noprocessing", action="store_true", dest="noprocessing", default=False,
help="Do not modify image and ignore any profil or processing option")
diff --git a/kindlecomicconverter/image.py b/kindlecomicconverter/image.py
index 05ff7ea..4370303 100755
--- a/kindlecomicconverter/image.py
+++ b/kindlecomicconverter/image.py
@@ -175,7 +175,10 @@ class ComicPageParser:
self.payload.append(['N', self.source, new_image, self.color, self.fill])
elif (width > height) != (dstwidth > dstheight) and width <= dstheight and height <= dstwidth \
and not self.opt.webtoon and self.opt.splitter == 1:
- self.payload.append(['R', self.source, self.image.rotate(90, Image.Resampling.BICUBIC, True), self.color, self.fill])
+ spread = self.image
+ if not self.opt.norotate:
+ spread = spread.rotate(90, Image.Resampling.BICUBIC, True)
+ self.payload.append(['R', self.source, spread, self.color, self.fill])
elif (width > height) != (dstwidth > dstheight) and not self.opt.webtoon:
if self.opt.splitter != 1:
if width > height:
@@ -193,7 +196,10 @@ class ComicPageParser:
self.payload.append(['S1', self.source, pageone, self.color, self.fill])
self.payload.append(['S2', self.source, pagetwo, self.color, self.fill])
if self.opt.splitter > 0:
- self.payload.append(['R', self.source, self.image.rotate(90, Image.Resampling.BICUBIC, True),
+ spread = self.image
+ if not self.opt.norotate:
+ spread = spread.rotate(90, Image.Resampling.BICUBIC, True)
+ self.payload.append(['R', self.source, spread,
self.color, self.fill])
else:
self.payload.append(['N', self.source, self.image, self.color, self.fill])