--dither option
This commit is contained in:
parent
eb590994d7
commit
6a02da4a5f
|
|
@ -351,7 +351,10 @@ class ASCII(callbacks.Plugin):
|
|||
image2 = image2.convert('RGB')
|
||||
image2 = ImageOps.autocontrast(image2)
|
||||
image2 = image2.resize((cols, rows), Image.LANCZOS)
|
||||
image2 = image2.convert('P', dither=Image.FLOYDSTEINBERG, palette=Image.WEB)
|
||||
if 'dither' in optlist:
|
||||
image2 = image2.convert('P', dither=Image.FLOYDSTEINBERG, palette=Image.WEB)
|
||||
else:
|
||||
image2 = image2.convert('P', dither=None, palette=Image.WEB)
|
||||
image2 = image2.convert('RGB')
|
||||
lumamap = np.array(image)
|
||||
colormap = np.array(image2)
|
||||
|
|
@ -478,7 +481,10 @@ class ASCII(callbacks.Plugin):
|
|||
image2 = image2.convert('RGB')
|
||||
image2 = ImageOps.autocontrast(image2)
|
||||
image2 = image2.resize((cols, rows), Image.LANCZOS)
|
||||
image2 = image2.convert('P', dither=Image.FLOYDSTEINBERG, palette=Image.WEB)
|
||||
if 'dither' in optlist:
|
||||
image2 = image2.convert('P', dither=Image.FLOYDSTEINBERG, palette=Image.WEB)
|
||||
else:
|
||||
image2 = image2.convert('P', dither=None, palette=Image.WEB)
|
||||
image2 = image2.convert('RGB')
|
||||
lumamap = np.array(image)
|
||||
colormap = np.array(image2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue