mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 01:36:27 +00:00
Fixes to grayscale pages in forcecolor mode (#978)
* Fix bit depth of non-color pages in forcecolor mode * Optimization for JPEG non-color pages in forcecolor mode
This commit is contained in:
@@ -642,8 +642,8 @@ def imgFileProcessing(work):
|
||||
img.autocontrastImage()
|
||||
img.resizeImage()
|
||||
img.optimizeForDisplay(opt.reducerainbow)
|
||||
if opt.forcepng and not opt.forcecolor:
|
||||
img.quantizeImage()
|
||||
if not opt.forcecolor or (opt.forcecolor and not workImg.color):
|
||||
img.convertToGrayscaleOrQuantize()
|
||||
output.append(img.saveToDir())
|
||||
return output
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user