autocontrast color image

This commit is contained in:
Gordon Shumway 2019-03-27 01:52:02 -04:00 committed by GitHub
parent 180d7ac7a7
commit 7293c64daa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -288,6 +288,7 @@ class ASCII(callbacks.Plugin):
image = image.resize((cols, rows), Image.LANCZOS)
image2 = image2.convert('RGBA')
image2 = image2.convert('RGB')
image2 = ImageOps.autocontrast(image2)
image2 = image2.resize((cols, rows), Image.LANCZOS)
lumamap = np.array(image)
colormap = np.array(image2)
@ -381,6 +382,7 @@ class ASCII(callbacks.Plugin):
image = image.resize((cols, rows), Image.LANCZOS)
image2 = image2.convert('RGBA')
image2 = image2.convert('RGB')
image2 = ImageOps.autocontrast(image2)
image2 = image2.resize((cols, rows), Image.LANCZOS)
lumamap = np.array(image)
colormap = np.array(image2)