X-Git-Url: https://vcs.fsf.org/?p=rainbowstream.git;a=blobdiff_plain;f=rainbowstream%2Fc_image.py;h=7b334894530f801bfb4c99023e95595e0acb29bf;hp=bc2112e02fc85f6bc27b0c2fcd30cf67cd9dc439;hb=06302419959d8b8ea91ff8e2b45492743256c7b5;hpb=4592d23132bd4089ce643f90bd22a66d712e90db diff --git a/rainbowstream/c_image.py b/rainbowstream/c_image.py index bc2112e..7b33489 100644 --- a/rainbowstream/c_image.py +++ b/rainbowstream/c_image.py @@ -27,7 +27,7 @@ def pixel_print(ansicolor): def image_to_display(path,start=None,length=None): rows, columns = os.popen('stty size', 'r').read().split() if not start: - start = IMAGE_SHIFT + start = c['IMAGE_SHIFT'] if not length: length = int(columns) - 2 * start i = Image.open(path) @@ -38,7 +38,7 @@ def image_to_display(path,start=None,length=None): height = int(float(h) * (float(width) / float(w))) height //= 2 i = i.resize((width, height), Image.ANTIALIAS) - height = min(height, IMAGE_MAX_HEIGHT) + height = min(height, c['IMAGE_MAX_HEIGHT']) for y in xrange(height): print ' ' * start,