fix subtle incorrectness with gamma correction with BW images saved as RGB (#1461)

This commit is contained in:
Alex Xu
2026-10-15 11:21:38 -07:00
committed by GitHub
parent d560b78928
commit f1d42ea34c
+5 -2
View File
@@ -420,9 +420,12 @@ class ComicPage:
if self.opt.hq: if self.opt.hq:
self.size = (int(self.size[0] * 1.5), int(self.size[1] * 1.5)) self.size = (int(self.size[0] * 1.5), int(self.size[1] * 1.5))
self.original_color_mode = image.mode self.original_color_mode = image.mode
# TODO: color check earlier self.image = image
self.image = image.convert("RGB")
self.color = colorCheck(self.image, self.original_color_mode, self.opt) self.color = colorCheck(self.image, self.original_color_mode, self.opt)
if self.color:
self.image = self.image.convert('RGB')
else:
self.image = self.image.convert('L')
self.colorOutput = self.color and self.opt.forcecolor self.colorOutput = self.color and self.opt.forcecolor
self.page_background_color = page_background_color self.page_background_color = page_background_color
self.fill = fill self.fill = fill