From 0abad5844686ff7cc6421cdc73b74741187996c7 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 17 Aug 2023 15:59:20 +0800 Subject: [PATCH] added feature titles to place image --- stockTicker.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/stockTicker.py b/stockTicker.py index a2c9558..9503915 100755 --- a/stockTicker.py +++ b/stockTicker.py @@ -5602,21 +5602,28 @@ class StockTicker(): f.close() imgs = [] + feature_title = False for place in all_settings['places']: if "2017" in place: try: img = self.openImage('logos/r_place/r_place 2017.png') + if all_settings['title']: + feature_title = self.openImage('feature_titles/place2017.png') except: pass elif "2022" in place: try: img = self.openImage('logos/r_place/r_place 2022.png') + if all_settings['title']: + feature_title = self.openImage('feature_titles/place2022.png') except: pass elif "2023" in place: try: img = self.openImage('logos/r_place/r_place 2023.png') + if all_settings['title']: + feature_title = self.openImage('feature_titles/place2023.png') except: pass try: @@ -5625,8 +5632,16 @@ class StockTicker(): x = random.randint(0, max_x) y = random.randint(0, max_y) snapshot = img.crop((x, y, x + int(all_settings['width']), y + 32)) - imgs.append(snapshot) + + try: + imgs.append(self.stitchImage([feature_title,snapshot])) + except: + imgs.append(snapshot) img.close() + try: + feature_title.close() + except: + pass except: pass