1
0
mirror of https://github.com/ciromattia/kcc synced 2026-01-27 23:47:41 +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

View File

@@ -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.

View File

@@ -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')

View File

@@ -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.

View File

@@ -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]: