Implemented image resizing if image won't fit in window
[rainbowstream.git] / rainbowstream / rainbow.py
index 114e42514d7fe71aa3930041bc84dee75975ba87..b15ef593111f8746e293f9ba6211e8dbce52aa55 100644 (file)
@@ -242,6 +242,8 @@ def init(args):
     set_config('IMAGE_ON_TERM', str(c['IMAGE_ON_TERM']))
     # Use 24 bit color
     c['24BIT'] = args.color_24bit
+    # Resize images based on the current terminal size
+    set_config('IMAGE_RESIZE_TO_FIT', str(c.get('IMAGE_RESIZE_TO_FIT', False)))
     # Check type of ONLY_LIST and IGNORE_LIST
     if not isinstance(c['ONLY_LIST'], list):
         printNicely(red('ONLY_LIST is not a valid list value.'))