better ansi shading

This commit is contained in:
Gordon Shumway 2019-03-23 19:20:19 -04:00 committed by GitHub
parent 8ac99f8a02
commit d362eb2cd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -329,9 +329,9 @@ class ASCII(callbacks.Plugin):
else:
cols = 80
if 'invert' in optlist:
gscale = "▓▒░"
gscale = "▓▒░"
else:
gscale = "░▒▓█"
gscale = "░▒▓█"
path = os.path.dirname(os.path.abspath(__file__))
filepath = "{0}/tmp".format(path)
filename = "{0}/{1}".format(filepath, url.split('/')[-1])
@ -390,7 +390,7 @@ class ASCII(callbacks.Plugin):
# get average luminance
avg = int(self.getAverageL(img))
# look up ascii char
gsval = gscale[int((avg*3)/255)]
gsval = gscale[int((avg*4)/255)]
# get color value
color = self.getAverageC(colormap[j][i].tolist(),speed)
#color = self.getAverageC(img2,speed)