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:
Adrian
2025-06-18 15:12:12 -07:00
committed by GitHub
parent 2fa90c9f59
commit e9f0310b94
2 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -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: