mirror of
https://github.com/ciromattia/kcc
synced 2026-10-09 02:52:33 +00:00
Added some comments
This commit is contained in:
+10
-2
@@ -696,24 +696,32 @@ def getOutputFilename(srcpath, wantedname, ext):
|
|||||||
|
|
||||||
def checkOptions():
|
def checkOptions():
|
||||||
global options
|
global options
|
||||||
|
# Landscape mode is only supported by Kindle Touch and Paperwhite.
|
||||||
if options.profile == 'K4T' or options.profile == 'KHD':
|
if options.profile == 'K4T' or options.profile == 'KHD':
|
||||||
options.landscapemode = True
|
options.landscapemode = True
|
||||||
else:
|
else:
|
||||||
options.landscapemode = False
|
options.landscapemode = False
|
||||||
|
# Older Kindle don't support Virtual Panel View. We providing them configuration that will fake that feature.
|
||||||
if options.profile == 'K3' or options.profile == 'K4NT':
|
if options.profile == 'K3' or options.profile == 'K4NT':
|
||||||
#Real Panel View
|
# Real Panel View
|
||||||
options.panelview = True
|
options.panelview = True
|
||||||
else:
|
else:
|
||||||
#Virtual Panel View
|
# Virtual Panel View
|
||||||
options.panelview = False
|
options.panelview = False
|
||||||
|
# Older Kindle don't need higher resolution files due lack of Panel View.
|
||||||
|
# Kindle Fire family have very high resolution. Bigger images are not needed.
|
||||||
if options.profile == 'K1' or options.profile == 'K2' or options.profile == 'KDX' or options.profile == 'KDXG'\
|
if options.profile == 'K1' or options.profile == 'K2' or options.profile == 'KDX' or options.profile == 'KDXG'\
|
||||||
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.nopanelviewhq = True
|
options.nopanelviewhq = True
|
||||||
|
# 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':
|
if options.profile == 'KF' or options.profile == 'KFHD' or options.profile == 'KFHD8':
|
||||||
options.forcecolor = True
|
options.forcecolor = True
|
||||||
options.forcepng = False
|
options.forcepng = False
|
||||||
else:
|
else:
|
||||||
options.forcecolor = False
|
options.forcecolor = False
|
||||||
|
# Mixing vertical and horizontal pages require real Panel View.
|
||||||
|
# Landscape mode don't work correcly without Virtual Panel View.
|
||||||
if options.rotate:
|
if options.rotate:
|
||||||
options.panelview = True
|
options.panelview = True
|
||||||
options.landscapemode = False
|
options.landscapemode = False
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ class ComicPage:
|
|||||||
try:
|
try:
|
||||||
if not color:
|
if not color:
|
||||||
self.image = self.image.convert('L') # convert to grayscale
|
self.image = self.image.convert('L') # convert to grayscale
|
||||||
|
# Sufix is used to recognise which files need horizontal Panel View.
|
||||||
if sufix == "R":
|
if sufix == "R":
|
||||||
sufix = "_rotated"
|
sufix = "_rotated"
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user