diff --git a/README.md b/README.md index 4c3c53a..fe8f121 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ If it happens to you please append your message to [Issue #52](https://github.co ### Important tips: * 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. +* 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. * The first image found will be set as the comic's cover. * All files/directories will be added to EPUB in alphabetical order. diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index 5f91198..9a94db4 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -73,7 +73,7 @@ class VersionThread(QtCore.QThread): except Exception: return 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') diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index e8ba199..30ee6e0 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -193,7 +193,6 @@ def buildNCX(dstdir, title, chapters): def buildOPF(dstdir, title, filelist, cover=None): opffile = os.path.join(dstdir, 'OEBPS', 'content.opf') - # read the first file resolution profilelabel, deviceres, palette, gamma, panelviewsize = options.profileData imgres = str(deviceres[0]) + "x" + str(deviceres[1]) 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, options.landscapemode, options.quality) img.optimizeImage(options.gamma) - if options.forcepng: + if options.forcepng and not options.forcecolor: img.quantizeImage() @@ -800,10 +799,8 @@ def checkOptions(): or options.profile == 'KF' or options.profile == 'KFHD' or options.profile == 'KFHD8': options.quality = 0 # 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: options.forcecolor = True - options.forcepng = False else: options.forcecolor = False # Mixing vertical and horizontal pages require real Panel View. diff --git a/kcc/image.py b/kcc/image.py index 2874c1c..2accc6d 100755 --- a/kcc/image.py +++ b/kcc/image.py @@ -28,14 +28,6 @@ except ImportError: exit(1) -class ImageFlags: - Orient = 1 << 0 - Resize = 1 << 1 - Frame = 1 << 2 - Quantize = 1 << 3 - Stretch = 1 << 4 - - class ProfileData: Palette4 = [ 0x00, 0x00, 0x00, @@ -181,7 +173,7 @@ class ComicPage: size = (self.size[0], self.size[1]) else: 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: upscale = True if self.image.size[0] <= self.size[0] and self.image.size[1] <= self.size[1]: