mirror of
https://github.com/ciromattia/kcc
synced 2025-12-30 10:01:58 +00:00
New profiles
Kindle Touch support Virtual Panel View. Kindle Classic/NT is not.
This commit is contained in:
@@ -441,7 +441,7 @@ def main(argv=None):
|
||||
parser.add_option("-m", "--manga-style", action="store_true", dest="righttoleft", default=False,
|
||||
help="Manga style (Right-to-left reading and splitting) [Default=False]")
|
||||
parser.add_option("--panelview", action="store_true", dest="panelview", default=False,
|
||||
help="Add Panel View support (For Kindle Classic or older) [Default=False]")
|
||||
help="Add Panel View support (For Kindle Classic and Kindle Keyboard) [Default=False]")
|
||||
parser.add_option("--noprocessing", action="store_false", dest="imgproc", default=True,
|
||||
help="Do not apply image preprocessing (Page splitting and optimizations) [Default=True]")
|
||||
parser.add_option("--nodithering", action="store_true", dest="notquantize", default=False,
|
||||
|
||||
22
kcc/image.py
22
kcc/image.py
@@ -77,20 +77,22 @@ class ProfileData:
|
||||
]
|
||||
|
||||
Profiles = {
|
||||
'K1': ("Kindle", (600, 800), Palette4, 1.8),
|
||||
'K2': ("Kindle 2", (600, 800), Palette15, 1.8),
|
||||
'K3': ("Kindle 3/Keyboard", (600, 800), Palette16, 1.8),
|
||||
'K4': ("Kindle 4/NT/Touch", (600, 800), Palette16, 1.8),
|
||||
'KHD': ("Kindle Paperwhite", (758, 1024), Palette16, 1.8),
|
||||
'KDX': ("Kindle DX", (824, 1200), Palette15, 1.8),
|
||||
'KDXG': ("Kindle DXG", (824, 1200), Palette16, 1.8)
|
||||
'K1': ("Kindle", (600, 800), Palette4, 1.8, (900, 1200)),
|
||||
'K2': ("Kindle 2", (600, 800), Palette15, 1.8, (900, 1200)),
|
||||
'K3': ("Kindle Keyboard", (600, 800), Palette16, 1.8, (900, 1200)),
|
||||
'K4NT': ("Kindle Classic", (600, 800), Palette16, 1.8, (900, 1200)),
|
||||
'K4T': ("Kindle Touch", (600, 800), Palette16, 1.8, (900, 1200)),
|
||||
'KHD': ("Kindle Paperwhite", (758, 1024), Palette16, 1.8, (1137, 1536)),
|
||||
'KDX': ("Kindle DX", (824, 1200), Palette15, 1.8, (1236, 1800)),
|
||||
'KDXG': ("Kindle DXG", (824, 1200), Palette16, 1.8, (1236, 1800))
|
||||
}
|
||||
|
||||
ProfileLabels = {
|
||||
"Kindle": 'K1',
|
||||
"Kindle 2": 'K2',
|
||||
"Kindle 3/Keyboard": 'K3',
|
||||
"Kindle 4/NT/Touch": 'K4',
|
||||
"Kindle Keyboard": 'K3',
|
||||
"Kindle Classic": 'K4NT',
|
||||
"Kindle Touch": 'K4T',
|
||||
"Kindle Paperwhite": 'KHD',
|
||||
"Kindle DX": 'KDX',
|
||||
"Kindle DXG": 'KDXG'
|
||||
@@ -101,7 +103,7 @@ class ComicPage:
|
||||
def __init__(self, source, device):
|
||||
try:
|
||||
self.profile = device
|
||||
self.profile_label, self.size, self.palette, self.gamma = ProfileData.Profiles[device]
|
||||
self.profile_label, self.size, self.palette, self.gamma, self.panelviewsize = ProfileData.Profiles[device]
|
||||
except KeyError:
|
||||
raise RuntimeError('Unexpected output device %s' % device)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user