projects
/
rainbowstream.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change theme base on config
[rainbowstream.git]
/
rainbowstream
/
c_image.py
diff --git
a/rainbowstream/c_image.py
b/rainbowstream/c_image.py
index bc2112e02fc85f6bc27b0c2fcd30cf67cd9dc439..7b334894530f801bfb4c99023e95595e0acb29bf 100644
(file)
--- 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:
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)
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 = 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,
for y in xrange(height):
print ' ' * start,