From 860673bb0e705908f752c2410c3b89f75f58787d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Sun, 16 Jun 2013 22:53:18 +0200 Subject: [PATCH] Implemented --forcecolor --- README.md | 2 ++ kcc/comic2ebook.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 132f304..c621f50 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ Options: --nocutpagenumbers Do not try to cut page numbering on images [Default=True] -o OUTPUT, --output=OUTPUT Output generated file (EPUB or CBZ) to specified directory or file + --forcecolor Do not convert images to grayscale [Default=False] --customwidth=WIDTH Replace screen width provided by device profile [Default=0] --customheight=HEIGHT Replace screen height provided by device profile [Default=0] -v, --verbose Verbose output [Default=False] @@ -210,6 +211,7 @@ The app relies and includes the following scripts/binaries: * New QT GUI * Merge with AWKCC * Added support for custom width/height +* Added option to disable color conversion ## COPYRIGHT diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index d488927..44a5b71 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -668,6 +668,8 @@ def main(argv=None, qtGUI=None): help="Do not try to cut page numbering on images [Default=True]") parser.add_option("-o", "--output", action="store", dest="output", default=None, help="Output generated file (EPUB or CBZ) to specified directory or file") + parser.add_option("--forcecolor", action="store_true", dest="forcecolor", default=False, + help="Do not convert images to grayscale [Default=False]") parser.add_option("--customwidth", type="int", dest="customwidth", default=0, help="Replace screen width provided by device profile [Default=0]") parser.add_option("--customheight", type="int", dest="customheight", default=0, @@ -752,7 +754,7 @@ def checkOptions(): 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' or options.forcecolor: options.forcecolor = True options.forcepng = False else: