diff --git a/KCC-Linux.ui b/KCC-Linux.ui
index ffcf342..6c6c2f8 100644
--- a/KCC-Linux.ui
+++ b/KCC-Linux.ui
@@ -386,7 +386,7 @@
Qt::NoFocus
- <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Normal quality mode<br/></span><span style=" font-style:italic;">Use it when zoom is not needed.<br/></span>Overall quality: ★★★★★<br/>Zoom quality: ★<br/>File size: ★</p><p><span style=" font-weight:600; text-decoration: underline;">Indeterminate - High quality mode<br/></span><span style=" font-style:italic;">A compromise between quality and size.<br/></span>Overall quality: ★★★★<br/>Zoom quality: ★★★<br/>File size: ★★★<br/></p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Ultra quality mode<br/></span><span style=" font-style:italic;">Highest possible quality. Recommended.<br/></span>Overall quality: ★★★★★<br/>Zoom quality: ★★★★★<br/>File size: ★★★★★</p></body></html>
+ <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Normal quality mode</span><br/>Maximal quality of images but very poor magnification quality.<br/>Use it only when zoom is not needed or output files needs to be small.</p><p><span style=" font-weight:600; text-decoration: underline;">Indeterminate - High quality mode</span><br/>In most cases high quality of images and magnification.<br/>Overall quality highly depends on the resolution of source files.<br/>On Kindle models older than Paperwhite non-zoomed images might be a little blurred.<br/><br/><span style=" font-weight:600; text-decoration: underline;">Checked - Ultra quality mode</span><br/>Highest possible quality. Output files will be big.</p></body></html>
High/Ultra quality
diff --git a/KCC-OSX.ui b/KCC-OSX.ui
index 1b56fbc..28e1daa 100644
--- a/KCC-OSX.ui
+++ b/KCC-OSX.ui
@@ -391,7 +391,7 @@
Qt::NoFocus
- <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Normal quality mode</span><br/><span style=" font-style:italic;">Use it when zoom is not needed.</span><br/>Overall quality: ★★★★★<br/>Zoom quality: ★<br/>File size: ★<br/><br/><span style=" font-weight:600; text-decoration: underline;">Indeterminate - High quality mode</span><br/><span style=" font-style:italic;">A compromise between quality and size.</span><br/>Overall quality: ★★★★<br/>Zoom quality: ★★★<br/>File size: ★★★<br/><br/><span style=" font-weight:600; text-decoration: underline;">Checked - Ultra quality mode</span><br/><span style=" font-style:italic;">Highest possible quality. Recommended.</span><br/>Overall quality: ★★★★★<br/>Zoom quality: ★★★★★<br/>File size: ★★★★★</p></body></html>
+ <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Normal quality mode</span><br/>Maximal quality of images but very poor magnification quality.<br/>Use it only when zoom is not needed or output files needs to be small.</p><p><span style=" font-weight:600; text-decoration: underline;">Indeterminate - High quality mode</span><br/>In most cases high quality of images and magnification.<br/>Overall quality highly depends on the resolution of source files.<br/>On Kindle models older than Paperwhite non-zoomed images might be a little blurred.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Ultra quality mode</span><br/>Highest possible quality. Output files will be big.</p></body></html>
High/Ultra quality
diff --git a/KCC.ui b/KCC.ui
index 8da5179..28b7cd9 100644
--- a/KCC.ui
+++ b/KCC.ui
@@ -338,7 +338,7 @@
Qt::NoFocus
- <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Normal quality mode<br/></span><span style=" font-style:italic;">Use it when zoom is not needed.</span><span style=" font-weight:600; text-decoration: underline;"><br/></span>Overall quality: ★★★★★<br/>Zoom quality: ★<br/>File size: ★</p><p><span style=" font-weight:600; text-decoration: underline;">Indeterminate - High quality mode<br/></span><span style=" font-style:italic;">A compromise between quality and size.</span><span style=" font-weight:600; text-decoration: underline;"><br/></span>Overall quality: ★★★★<br/>Zoom quality: ★★★<br/>File size: ★★★</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Ultra quality mode<br/></span><span style=" font-style:italic;">Highest possible quality. Recommended.</span><span style=" font-weight:600; text-decoration: underline;"><br/></span>Overall quality: ★★★★★<br/>Zoom quality: ★★★★★<br/>File size: ★★★★★</p></body></html>
+ <html><head/><body><p style="white-space:pre"><span style=" font-weight:600; text-decoration: underline;">Unchecked - Normal quality mode<br/></span>Maximal quality of images but very poor magnification quality.<br/>Use it only when zoom is not needed or output files needs to be small.</p><p style="white-space:pre"><span style=" font-weight:600; text-decoration: underline;">Indeterminate - High quality mode<br/></span>In most cases high quality of images and magnification.<br/>Overall quality highly depends on the resolution of source files.<br/>On Kindle models older than Paperwhite non-zoomed images might be a little blurred.</p><p style="white-space:pre"><span style=" font-weight:600; text-decoration: underline;">Checked - Ultra quality mode<br/></span>Highest possible quality. Output files will be big.</p></body></html>
High/Ultra quality
diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py
index 0cb8ca1..7cc66a4 100644
--- a/kcc/KCC_gui.py
+++ b/kcc/KCC_gui.py
@@ -278,7 +278,7 @@ class KindleGenThread(QtCore.QRunnable):
kindlegenErrorCode = 0
kindlegenError = ''
try:
- if os.path.getsize(self.work) < 367001600:
+ if os.path.getsize(self.work) < 629145600:
output = Popen('kindlegen -dont_append_source -locale en "' + self.work + '"', stdout=PIPE,
stderr=STDOUT, shell=True)
for line in output.stdout:
diff --git a/kcc/KCC_ui.py b/kcc/KCC_ui.py
index 9867698..612009a 100644
--- a/kcc/KCC_ui.py
+++ b/kcc/KCC_ui.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'KCC.ui'
#
-# Created: Thu May 15 19:36:32 2014
+# Created: Sun May 18 09:08:27 2014
# by: PyQt5 UI code generator 5.2.1
#
# WARNING! All changes made in this file will be lost!
@@ -281,7 +281,7 @@ class Ui_KCC(object):
self.ClearButton.setText(_translate("KCC", "Clear list"))
self.MangaBox.setToolTip(_translate("KCC", "
Enable right-to-left reading.
"))
self.MangaBox.setText(_translate("KCC", "Manga mode"))
- self.QualityBox.setToolTip(_translate("KCC", "Unchecked - Normal quality mode
Use it when zoom is not needed.
Overall quality: ★★★★★
Zoom quality: ★
File size: ★
Indeterminate - High quality mode
A compromise between quality and size.
Overall quality: ★★★★
Zoom quality: ★★★
File size: ★★★
Checked - Ultra quality mode
Highest possible quality. Recommended.
Overall quality: ★★★★★
Zoom quality: ★★★★★
File size: ★★★★★
"))
+ self.QualityBox.setToolTip(_translate("KCC", "Unchecked - Normal quality mode
Maximal quality of images but very poor magnification quality.
Use it only when zoom is not needed or output files needs to be small.
Indeterminate - High quality mode
In most cases high quality of images and magnification.
Overall quality highly depends on the resolution of source files.
On Kindle models older than Paperwhite non-zoomed images might be a little blurred.
Checked - Ultra quality mode
Highest possible quality. Output files will be big.
"))
self.QualityBox.setText(_translate("KCC", "High/Ultra quality"))
self.RotateBox.setToolTip(_translate("KCC", "Disable splitting of two-page spreads.
They will be rotated instead.
"))
self.RotateBox.setText(_translate("KCC", "Horizontal mode"))
diff --git a/kcc/KCC_ui_linux.py b/kcc/KCC_ui_linux.py
index d30fe4e..cdc0661 100644
--- a/kcc/KCC_ui_linux.py
+++ b/kcc/KCC_ui_linux.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'KCC-Linux.ui'
#
-# Created: Thu May 15 19:36:41 2014
+# Created: Sun May 18 09:08:37 2014
# by: PyQt5 UI code generator 5.2.1
#
# WARNING! All changes made in this file will be lost!
@@ -350,7 +350,7 @@ class Ui_KCC(object):
self.ClearButton.setText(_translate("KCC", "Clear list"))
self.MangaBox.setToolTip(_translate("KCC", "Enable right-to-left reading.
"))
self.MangaBox.setText(_translate("KCC", "Manga mode"))
- self.QualityBox.setToolTip(_translate("KCC", "Unchecked - Normal quality mode
Use it when zoom is not needed.
Overall quality: ★★★★★
Zoom quality: ★
File size: ★
Indeterminate - High quality mode
A compromise between quality and size.
Overall quality: ★★★★
Zoom quality: ★★★
File size: ★★★
Checked - Ultra quality mode
Highest possible quality. Recommended.
Overall quality: ★★★★★
Zoom quality: ★★★★★
File size: ★★★★★
"))
+ self.QualityBox.setToolTip(_translate("KCC", "Unchecked - Normal quality mode
Maximal quality of images but very poor magnification quality.
Use it only when zoom is not needed or output files needs to be small.
Indeterminate - High quality mode
In most cases high quality of images and magnification.
Overall quality highly depends on the resolution of source files.
On Kindle models older than Paperwhite non-zoomed images might be a little blurred.
Checked - Ultra quality mode
Highest possible quality. Output files will be big.
"))
self.QualityBox.setText(_translate("KCC", "High/Ultra quality"))
self.RotateBox.setToolTip(_translate("KCC", "Disable splitting of two-page spreads.
They will be rotated instead.
"))
self.RotateBox.setText(_translate("KCC", "Horizontal mode"))
diff --git a/kcc/KCC_ui_osx.py b/kcc/KCC_ui_osx.py
index 7b30f58..4bc9848 100644
--- a/kcc/KCC_ui_osx.py
+++ b/kcc/KCC_ui_osx.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'KCC-OSX.ui'
#
-# Created: Thu May 15 19:36:50 2014
+# Created: Sun May 18 09:08:44 2014
# by: PyQt5 UI code generator 5.2.1
#
# WARNING! All changes made in this file will be lost!
@@ -373,7 +373,7 @@ class Ui_KCC(object):
self.ClearButton.setText(_translate("KCC", "Clear list"))
self.MangaBox.setToolTip(_translate("KCC", "Enable right-to-left reading.
"))
self.MangaBox.setText(_translate("KCC", "Manga mode"))
- self.QualityBox.setToolTip(_translate("KCC", "Unchecked - Normal quality mode
Use it when zoom is not needed.
Overall quality: ★★★★★
Zoom quality: ★
File size: ★
Indeterminate - High quality mode
A compromise between quality and size.
Overall quality: ★★★★
Zoom quality: ★★★
File size: ★★★
Checked - Ultra quality mode
Highest possible quality. Recommended.
Overall quality: ★★★★★
Zoom quality: ★★★★★
File size: ★★★★★
"))
+ self.QualityBox.setToolTip(_translate("KCC", "Unchecked - Normal quality mode
Maximal quality of images but very poor magnification quality.
Use it only when zoom is not needed or output files needs to be small.
Indeterminate - High quality mode
In most cases high quality of images and magnification.
Overall quality highly depends on the resolution of source files.
On Kindle models older than Paperwhite non-zoomed images might be a little blurred.
Checked - Ultra quality mode
Highest possible quality. Output files will be big.
"))
self.QualityBox.setText(_translate("KCC", "High/Ultra quality"))
self.RotateBox.setToolTip(_translate("KCC", "Disable splitting of two-page spreads.
They will be rotated instead.
"))
self.RotateBox.setText(_translate("KCC", "Horizontal mode"))
diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py
index c7f540b..f84382e 100755
--- a/kcc/comic2ebook.py
+++ b/kcc/comic2ebook.py
@@ -231,7 +231,10 @@ def buildNCX(dstdir, title, chapters, chapterNames):
def buildOPF(dstdir, title, filelist, cover=None):
opffile = os.path.join(dstdir, 'OEBPS', 'content.opf')
profilelabel, deviceres, palette, gamma, panelviewsize = options.profileData
- imgres = str(deviceres[0]) + "x" + str(deviceres[1])
+ if options.quality == 1:
+ imgres = str(panelviewsize[0]) + "x" + str(panelviewsize[1])
+ else:
+ imgres = str(deviceres[0]) + "x" + str(deviceres[1])
if options.righttoleft:
writingmode = "horizontal-rl"
else:
@@ -729,7 +732,7 @@ def splitDirectory(path, mode):
for root, dirs, files in walkLevel(path, 0):
for name in files:
size = os.path.getsize(os.path.join(root, name))
- if currentSize + size > 314572800:
+ if currentSize + size > 419430400:
currentTarget, pathRoot = createNewTome()
output.append(pathRoot)
currentSize = size
@@ -741,7 +744,7 @@ def splitDirectory(path, mode):
for root, dirs, files in walkLevel(path, 0):
for name in dirs:
size = getDirectorySize(os.path.join(root, name))
- if currentSize + size > 314572800:
+ if currentSize + size > 419430400:
currentTarget, pathRoot = createNewTome()
output.append(pathRoot)
currentSize = size
@@ -755,7 +758,7 @@ def splitDirectory(path, mode):
for name in dirs:
size = getDirectorySize(os.path.join(root, name))
currentSize = 0
- if size > 314572800:
+ if size > 419430400:
if not firstTome:
currentTarget, pathRoot = createNewTome()
output.append(pathRoot)
@@ -764,7 +767,7 @@ def splitDirectory(path, mode):
for rootInside, dirsInside, filesInside in walkLevel(os.path.join(root, name), 0):
for nameInside in dirsInside:
size = getDirectorySize(os.path.join(rootInside, nameInside))
- if currentSize + size > 314572800:
+ if currentSize + size > 419430400:
currentTarget, pathRoot = createNewTome()
output.append(pathRoot)
currentSize = size
@@ -784,65 +787,61 @@ def splitDirectory(path, mode):
#noinspection PyUnboundLocalVariable
def preSplitDirectory(path):
- if getDirectorySize(os.path.join(path, 'OEBPS', 'Images')) > 314572800:
- # Detect directory stucture
- for root, dirs, files in walkLevel(os.path.join(path, 'OEBPS', 'Images'), 0):
- subdirectoryNumber = len(dirs)
- filesNumber = len(files)
- if subdirectoryNumber == 0:
- # No subdirectories
- mode = 0
- else:
- if filesNumber > 0:
- print('\nWARNING: Automatic output splitting failed.')
- if GUI:
- GUI.addMessage.emit('Automatic output splitting failed. '
- 'More details.', 'warning', False)
- GUI.addMessage.emit('', '', False)
- return [path]
- detectedSubSubdirectories = False
- detectedFilesInSubdirectories = False
- for root, dirs, files in walkLevel(os.path.join(path, 'OEBPS', 'Images'), 1):
- if root != os.path.join(path, 'OEBPS', 'Images'):
- if len(dirs) != 0:
- detectedSubSubdirectories = True
- elif len(dirs) == 0 and detectedSubSubdirectories:
- print('\nWARNING: Automatic output splitting failed.')
- if GUI:
- GUI.addMessage.emit('Automatic output splitting failed. '
- 'More details.', 'warning', False)
- GUI.addMessage.emit('', '', False)
- return [path]
- if len(files) != 0:
- detectedFilesInSubdirectories = True
- if detectedSubSubdirectories:
- # Two levels of subdirectories
- mode = 2
- else:
- # One level of subdirectories
- mode = 1
- if detectedFilesInSubdirectories and detectedSubSubdirectories:
- print('\nWARNING: Automatic output splitting failed.')
- if GUI:
- GUI.addMessage.emit('Automatic output splitting failed. '
- 'More details.', 'warning', False)
- GUI.addMessage.emit('', '', False)
- return [path]
- # Split directories
- splitter = splitDirectory(os.path.join(path, 'OEBPS', 'Images'), mode)
- path = [path]
- for tome in splitter:
- path.append(tome)
- return path
+ # Detect directory stucture
+ for root, dirs, files in walkLevel(os.path.join(path, 'OEBPS', 'Images'), 0):
+ subdirectoryNumber = len(dirs)
+ filesNumber = len(files)
+ if subdirectoryNumber == 0:
+ # No subdirectories
+ mode = 0
else:
- # No splitting is necessary
- return [path]
+ if filesNumber > 0:
+ print('\nWARNING: Automatic output splitting failed.')
+ if GUI:
+ GUI.addMessage.emit('Automatic output splitting failed. '
+ 'More details.', 'warning', False)
+ GUI.addMessage.emit('', '', False)
+ return [path]
+ detectedSubSubdirectories = False
+ detectedFilesInSubdirectories = False
+ for root, dirs, files in walkLevel(os.path.join(path, 'OEBPS', 'Images'), 1):
+ if root != os.path.join(path, 'OEBPS', 'Images'):
+ if len(dirs) != 0:
+ detectedSubSubdirectories = True
+ elif len(dirs) == 0 and detectedSubSubdirectories:
+ print('\nWARNING: Automatic output splitting failed.')
+ if GUI:
+ GUI.addMessage.emit('Automatic output splitting failed. '
+ 'More details.', 'warning', False)
+ GUI.addMessage.emit('', '', False)
+ return [path]
+ if len(files) != 0:
+ detectedFilesInSubdirectories = True
+ if detectedSubSubdirectories:
+ # Two levels of subdirectories
+ mode = 2
+ else:
+ # One level of subdirectories
+ mode = 1
+ if detectedFilesInSubdirectories and detectedSubSubdirectories:
+ print('\nWARNING: Automatic output splitting failed.')
+ if GUI:
+ GUI.addMessage.emit('Automatic output splitting failed. '
+ 'More details.', 'warning', False)
+ GUI.addMessage.emit('', '', False)
+ return [path]
+ # Split directories
+ splitter = splitDirectory(os.path.join(path, 'OEBPS', 'Images'), mode)
+ path = [path]
+ for tome in splitter:
+ path.append(tome)
+ return path
def detectCorruption(tmpPath, orgPath):