mirror of
https://github.com/ciromattia/kcc
synced 2026-10-05 17:12:32 +00:00
fix dark images on Kindle 1/2/3 for cbz png (#1450)
This commit is contained in:
@@ -158,7 +158,7 @@ For flatpak, Docker, and AppImage versions, refer to the wiki: https://github.co
|
|||||||
- May happen when [using PNG with Kindle Scribe](https://github.com/ciromattia/kcc/issues/665) or [any format with a Kindle Colorsoft](https://github.com/ciromattia/kcc/issues/768). Solve by using JPG with Kindle Scribe or buying a Kobo Colour. Happens more often when turning pages really fast. You can try PDF output.
|
- May happen when [using PNG with Kindle Scribe](https://github.com/ciromattia/kcc/issues/665) or [any format with a Kindle Colorsoft](https://github.com/ciromattia/kcc/issues/768). Solve by using JPG with Kindle Scribe or buying a Kobo Colour. Happens more often when turning pages really fast. You can try PDF output.
|
||||||
Going back a few pages and exiting and re-entering book should fix it temporarily.
|
Going back a few pages and exiting and re-entering book should fix it temporarily.
|
||||||
- What output format should I use?
|
- What output format should I use?
|
||||||
- MOBI for Kindles. CBZ for Kindle DX. CBZ for Koreader. KEPUB for Kobo. PDF for ReMarkable or Kindle Scribe 2025.
|
- MOBI for modern Kindles. [CBZ for KF7 Kindles](https://ebooks.stackexchange.com/questions/173/how-to-use-the-e-ink-kindle-readers-to-display-photos) like the Kindle 1/2/3/DX. CBZ for Koreader. KEPUB for Kobo (Kobo profile + EPUB = KEPUB). PDF for ReMarkable or Kindle Scribe 2025.
|
||||||
- Where is KEPUB option?
|
- Where is KEPUB option?
|
||||||
- Choosing a Kobo profile and EPUB output will output KEPUB.
|
- Choosing a Kobo profile and EPUB output will output KEPUB.
|
||||||
- All options have additional information in tooltips if you hover over the option.
|
- All options have additional information in tooltips if you hover over the option.
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ from .KCC_spread_label import LabelSpreadsDialog
|
|||||||
|
|
||||||
from .shared import HTMLStripper, sanitizeTrace, walkLevel
|
from .shared import HTMLStripper, sanitizeTrace, walkLevel
|
||||||
from .comicarchive import SEVENZIP, TAR, available_archive_tools
|
from .comicarchive import SEVENZIP, TAR, available_archive_tools
|
||||||
from .comic2ebook import OS_SORT_KEY, flattenTree, getWorkFolder, removeNonImages, sanitizeTree, detectKindleGen
|
from .comic2ebook import OS_SORT_KEY, KF7_KINDLES, flattenTree, getWorkFolder, removeNonImages, sanitizeTree, detectKindleGen
|
||||||
from . import __version__
|
from . import __version__
|
||||||
from . import comic2ebook
|
from . import comic2ebook
|
||||||
from . import metadata
|
from . import metadata
|
||||||
@@ -1140,7 +1140,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
if bad_format in current_format:
|
if bad_format in current_format:
|
||||||
self.addMessage('Colorsoft MOBI/EPUB can have blank pages. Just go back a few pages, exit, and reenter book.', 'info')
|
self.addMessage('Colorsoft MOBI/EPUB can have blank pages. Just go back a few pages, exit, and reenter book.', 'info')
|
||||||
break
|
break
|
||||||
elif profile['Label'] == 'KDX':
|
elif profile['Label'] in KF7_KINDLES:
|
||||||
GUI.mozJpegBox.setCheckState(Qt.CheckState.PartiallyChecked)
|
GUI.mozJpegBox.setCheckState(Qt.CheckState.PartiallyChecked)
|
||||||
GUI.borderBox.setCheckState(Qt.CheckState.PartiallyChecked)
|
GUI.borderBox.setCheckState(Qt.CheckState.PartiallyChecked)
|
||||||
GUI.pngLegacyBox.setChecked(True)
|
GUI.pngLegacyBox.setChecked(True)
|
||||||
@@ -1539,11 +1539,11 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
'DefaultUpscale': True, 'ForceColor': False, 'Label': 'KoL'},
|
'DefaultUpscale': True, 'ForceColor': False, 'Label': 'KoL'},
|
||||||
"Kobo Forma": {'PVOptions': False, 'ForceExpert': False, 'DefaultFormat': 1,
|
"Kobo Forma": {'PVOptions': False, 'ForceExpert': False, 'DefaultFormat': 1,
|
||||||
'DefaultUpscale': True, 'ForceColor': False, 'Label': 'KoF'},
|
'DefaultUpscale': True, 'ForceColor': False, 'Label': 'KoF'},
|
||||||
"Kindle 1": {'PVOptions': False, 'ForceExpert': False, 'DefaultFormat': 0,
|
"Kindle 1": {'PVOptions': False, 'ForceExpert': False, 'DefaultFormat': 2,
|
||||||
'DefaultUpscale': False, 'ForceColor': False, 'Label': 'K1'},
|
'DefaultUpscale': False, 'ForceColor': False, 'Label': 'K1'},
|
||||||
"Kindle 2": {'PVOptions': False, 'ForceExpert': False, 'DefaultFormat': 0,
|
"Kindle 2": {'PVOptions': False, 'ForceExpert': False, 'DefaultFormat': 2,
|
||||||
'DefaultUpscale': False, 'ForceColor': False, 'Label': 'K2'},
|
'DefaultUpscale': False, 'ForceColor': False, 'Label': 'K2'},
|
||||||
"Kindle Keyboard": {'PVOptions': False, 'ForceExpert': False, 'DefaultFormat': 0,
|
"Kindle Keyboard": {'PVOptions': False, 'ForceExpert': False, 'DefaultFormat': 2,
|
||||||
'DefaultUpscale': False, 'ForceColor': False, 'Label': 'K34'},
|
'DefaultUpscale': False, 'ForceColor': False, 'Label': 'K34'},
|
||||||
"Kindle Touch": {'PVOptions': False, 'ForceExpert': False, 'DefaultFormat': 0,
|
"Kindle Touch": {'PVOptions': False, 'ForceExpert': False, 'DefaultFormat': 0,
|
||||||
'DefaultUpscale': False, 'ForceColor': False, 'Label': 'K34'},
|
'DefaultUpscale': False, 'ForceColor': False, 'Label': 'K34'},
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ from . import __version__
|
|||||||
|
|
||||||
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
||||||
OS_SORT_KEY = os_sort_keygen()
|
OS_SORT_KEY = os_sort_keygen()
|
||||||
|
KF7_KINDLES = ('K1', 'K2', 'K34', 'KDX')
|
||||||
|
|
||||||
def main(argv=None):
|
def main(argv=None):
|
||||||
global options
|
global options
|
||||||
@@ -758,7 +759,7 @@ def imgFileProcessing(work):
|
|||||||
img.quantizeImage()
|
img.quantizeImage()
|
||||||
if opt.format == 'PDF':
|
if opt.format == 'PDF':
|
||||||
img.convertToGrayscale()
|
img.convertToGrayscale()
|
||||||
elif opt.profile == 'KDX' and opt.format == 'CBZ':
|
elif opt.profile in KF7_KINDLES and opt.format == 'CBZ':
|
||||||
img.convertToGrayscale()
|
img.convertToGrayscale()
|
||||||
elif opt.pnglegacy:
|
elif opt.pnglegacy:
|
||||||
img.convertToGrayscale()
|
img.convertToGrayscale()
|
||||||
@@ -1661,7 +1662,7 @@ def checkOptions(options):
|
|||||||
options.skip_zip = True
|
options.skip_zip = True
|
||||||
options.folder_output = True
|
options.folder_output = True
|
||||||
if options.format == 'Auto':
|
if options.format == 'Auto':
|
||||||
if options.profile in ['KDX']:
|
if options.profile in KF7_KINDLES:
|
||||||
options.format = 'CBZ'
|
options.format = 'CBZ'
|
||||||
elif options.profile in image.ProfileData.ProfilesKindle.keys():
|
elif options.profile in image.ProfileData.ProfilesKindle.keys():
|
||||||
options.format = 'MOBI'
|
options.format = 'MOBI'
|
||||||
@@ -1678,7 +1679,7 @@ def checkOptions(options):
|
|||||||
if (options.format == 'MOBI' or options.format == 'KFX') and options.batchsplit != 2:
|
if (options.format == 'MOBI' or options.format == 'KFX') and options.batchsplit != 2:
|
||||||
options.batchsplit = 1
|
options.batchsplit = 1
|
||||||
# Older Kindle models don't support Panel View.
|
# Older Kindle models don't support Panel View.
|
||||||
if options.profile == 'K1' or options.profile == 'K2' or options.profile == 'K34' or options.profile == 'KDX':
|
if options.profile in KF7_KINDLES:
|
||||||
options.panelview = False
|
options.panelview = False
|
||||||
options.hq = False
|
options.hq = False
|
||||||
if not options.hq and not options.autoscale and not options.legacypanelview:
|
if not options.hq and not options.autoscale and not options.legacypanelview:
|
||||||
|
|||||||
Reference in New Issue
Block a user