Merge pull request #12 from Filexor/colorfix_fix

Accept result.images with 4 components
master
LightChaser 2023-12-04 19:12:35 +08:00 committed by GitHub
commit e3a7c69c08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -251,6 +251,14 @@ class Script(scripts.Script):
fixed_images = []
# fix the color
for i in range(len(result.images)):
if result.images[i].mode == "RGBA":
# wavelet_color_fix expects shape[1] of input image is 3
result.images[i] = result.images[i].convert(mode = "RGB")
pass
pass
color_fix_func = wavelet_color_fix if color_fix == 'Wavelet' else adain_color_fix
for i in range(len(result.images)):
try: