1
0
mirror of https://github.com/ciromattia/kcc synced 2026-07-01 10:35:29 +00:00

Small tweaks

This commit is contained in:
Paweł Jastrzębski
2013-06-23 11:20:30 +02:00
parent 57bfd6b968
commit 795ccd9782
4 changed files with 4 additions and 14 deletions
+1
View File
@@ -49,6 +49,7 @@ If it happens to you please append your message to [Issue #52](https://github.co
### Important tips: ### Important tips:
* Use high quality source files. **This little detail have a major impact on the final result.** * Use high quality source files. **This little detail have a major impact on the final result.**
* Read tooltip of _High/Ultra quality_ option. There are many important informations there. * Read tooltip of _High/Ultra quality_ option. There are many important informations there.
* When converting images smaller than device resolution remember to enable upscaling.
* Check our [wiki](https://github.com/ciromattia/kcc/wiki/Other-devices) for a list of tested Non-Kindle E-Readers. * Check our [wiki](https://github.com/ciromattia/kcc/wiki/Other-devices) for a list of tested Non-Kindle E-Readers.
* The first image found will be set as the comic's cover. * The first image found will be set as the comic's cover.
* All files/directories will be added to EPUB in alphabetical order. * All files/directories will be added to EPUB in alphabetical order.
+1 -1
View File
@@ -73,7 +73,7 @@ class VersionThread(QtCore.QThread):
except Exception: except Exception:
return return
latestVersion = XML.childNodes[0].getElementsByTagName('latest')[0].childNodes[0].toxml() latestVersion = XML.childNodes[0].getElementsByTagName('latest')[0].childNodes[0].toxml()
if latestVersion != __version__: if tuple(map(int, (latestVersion.split(".")))) > tuple(map(int, (__version__.split(".")))):
self.emit(QtCore.SIGNAL("addMessage"), 'New version is available!', 'warning') self.emit(QtCore.SIGNAL("addMessage"), 'New version is available!', 'warning')
+1 -4
View File
@@ -193,7 +193,6 @@ def buildNCX(dstdir, title, chapters):
def buildOPF(dstdir, title, filelist, cover=None): def buildOPF(dstdir, title, filelist, cover=None):
opffile = os.path.join(dstdir, 'OEBPS', 'content.opf') opffile = os.path.join(dstdir, 'OEBPS', 'content.opf')
# read the first file resolution
profilelabel, deviceres, palette, gamma, panelviewsize = options.profileData profilelabel, deviceres, palette, gamma, panelviewsize = options.profileData
imgres = str(deviceres[0]) + "x" + str(deviceres[1]) imgres = str(deviceres[0]) + "x" + str(deviceres[1])
if options.righttoleft: if options.righttoleft:
@@ -337,7 +336,7 @@ def applyImgOptimization(img, isSplit, toRight, options, overrideQuality=5):
img.resizeImage(options.upscale, options.stretch, options.black_borders, isSplit, toRight, img.resizeImage(options.upscale, options.stretch, options.black_borders, isSplit, toRight,
options.landscapemode, options.quality) options.landscapemode, options.quality)
img.optimizeImage(options.gamma) img.optimizeImage(options.gamma)
if options.forcepng: if options.forcepng and not options.forcecolor:
img.quantizeImage() img.quantizeImage()
@@ -800,10 +799,8 @@ def checkOptions():
or options.profile == 'KF' or options.profile == 'KFHD' or options.profile == 'KFHD8': or options.profile == 'KF' or options.profile == 'KFHD' or options.profile == 'KFHD8':
options.quality = 0 options.quality = 0
# Disabling grayscale conversion for Kindle Fire family. # Disabling grayscale conversion for Kindle Fire family.
# Forcing JPEG output. For now code can't provide color PNG files.
if options.profile == 'KF' or options.profile == 'KFHD' or options.profile == 'KFHD8' or options.forcecolor: if options.profile == 'KF' or options.profile == 'KFHD' or options.profile == 'KFHD8' or options.forcecolor:
options.forcecolor = True options.forcecolor = True
options.forcepng = False
else: else:
options.forcecolor = False options.forcecolor = False
# Mixing vertical and horizontal pages require real Panel View. # Mixing vertical and horizontal pages require real Panel View.
+1 -9
View File
@@ -28,14 +28,6 @@ except ImportError:
exit(1) exit(1)
class ImageFlags:
Orient = 1 << 0
Resize = 1 << 1
Frame = 1 << 2
Quantize = 1 << 3
Stretch = 1 << 4
class ProfileData: class ProfileData:
Palette4 = [ Palette4 = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -181,7 +173,7 @@ class ComicPage:
size = (self.size[0], self.size[1]) size = (self.size[0], self.size[1])
else: else:
size = (self.panelviewsize[0], self.panelviewsize[1]) size = (self.panelviewsize[0], self.panelviewsize[1])
# Kindle Paperwhite - Force upscale of splited pages to increase readability # Kindle Paperwhite/Touch - Force upscale of splited pages to increase readability
if isSplit and landscapeMode: if isSplit and landscapeMode:
upscale = True upscale = True
if self.image.size[0] <= self.size[0] and self.image.size[1] <= self.size[1]: if self.image.size[0] <= self.size[0] and self.image.size[1] <= self.size[1]: