Update stockTicker.py
This commit is contained in:
parent
1f3f8488ca
commit
f4a9ef54c6
@ -7023,11 +7023,15 @@ class StockTicker():
|
|||||||
midFrame = self.textToImageProf(ticker, current, change, arrow, font=ImageFont.load("./fonts/6x10.pil")) #IMAGE THE TEXT
|
midFrame = self.textToImageProf(ticker, current, change, arrow, font=ImageFont.load("./fonts/6x10.pil")) #IMAGE THE TEXT
|
||||||
if sector_settings['logos']:
|
if sector_settings['logos']:
|
||||||
try:
|
try:
|
||||||
logos_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos'), 'sector')
|
try: #load the tiny logo
|
||||||
logo = Image.open(os.path.join(logos_path, category + '.png'))
|
logos_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos'), 'tiny_sector')
|
||||||
# half the size of the logo
|
logo = Image.open(os.path.join(logos_path, category + '.png'))
|
||||||
width, height = logo.size
|
except: # load the big logo and scale it
|
||||||
logo = logo.resize((int(width/2), int(height/2)))
|
logos_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos'), 'sector')
|
||||||
|
logo = Image.open(os.path.join(logos_path, category + '.png'))
|
||||||
|
# half the size of the logo
|
||||||
|
width, height = logo.size
|
||||||
|
logo = logo.resize((int(width/2), int(height/2)))
|
||||||
stitchedStock = self.stitchImage([logo,midFrame])
|
stitchedStock = self.stitchImage([logo,midFrame])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
stitchedStock = midFrame
|
stitchedStock = midFrame
|
||||||
|
Loading…
Reference in New Issue
Block a user