1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 01:36:27 +00:00

Prevents rainbow eraser crash on images with 1px dimensions

Don't apply rainbow eraser on images with 1px dimensions
This commit is contained in:
Its-my-right
2025-08-06 18:24:49 +02:00
committed by Alex Xu
parent 753eeb64eb
commit 6a7500441d

View File

@@ -383,7 +383,7 @@ class ComicPage:
def optimizeForDisplay(self, eraserainbow, is_color):
# Erase rainbow artifacts for grayscale and color images by removing spectral frequencies that cause Moire interference with color filter array
if eraserainbow:
if eraserainbow and all(dim > 1 for dim in self.image.size):
self.image = erase_rainbow_artifacts(self.image, is_color)
def resizeImage(self):