From 87987c9ebfc9253afa2e93e59ee2fce0d7db37cb Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Tue, 17 Mar 2026 15:09:02 -0700 Subject: [PATCH] fix humble bundle pdf png autocontrast (#1273) --- kindlecomicconverter/comic2ebook.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 9b017d4..3f6fd44 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -698,6 +698,9 @@ def imgFileProcessing(work): img.gammaCorrectImage() + if not img.colorOutput: + img.convertToGrayscale() + img.autocontrastImage() img.resizeImage() img.optimizeForDisplay(opt.eraserainbow, img.colorOutput) @@ -705,7 +708,6 @@ def imgFileProcessing(work): if img.colorOutput: pass elif opt.forcepng: - img.convertToGrayscale() if not opt.noquantize: img.quantizeImage() if opt.format == 'PDF': @@ -714,8 +716,6 @@ def imgFileProcessing(work): img.convertToGrayscale() elif opt.pnglegacy: img.convertToGrayscale() - else: - img.convertToGrayscale() output.append(img.saveToDir()) return output except Exception: