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 authored and Alex Xu committed 2025-08-06 12:12:21 -07:00
1 parent 753eeb64eb
commit 6a7500441d
1 file changed
+1 -1
+1 -1
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):