diff --git a/stockTicker.py b/stockTicker.py index 723f5e4..c1dd649 100755 --- a/stockTicker.py +++ b/stockTicker.py @@ -4636,7 +4636,11 @@ class StockTicker(): for i, frame in enumerate(ImageSequence.Iterator(GIF)): frame = frame.convert('P') frame.thumbnail((128, 32),Image.NEAREST) - + if frame.size[0] < 128: + diff = 128 - frame.size[0] + new_image = Image.new('RGB',(128,32)) + new_image.paste(frame,(64-int(frame.size[0]/2),0)) + frame = new_image #f = self.stitchImage([title_img, frame]) frames.append(frame) @@ -4646,7 +4650,11 @@ class StockTicker(): frame = frame.convert('P') frame.thumbnail((128, 32),Image.NEAREST) - + if frame.size[0] < 128: + diff = 128 - frame.size[0] + new_image = Image.new('RGB',(128,32)) + new_image.paste(frame,(64-int(frame.size[0]/2),0)) + frame = new_image #frame = frame.resize((99999, 32)) #f = self.stitchImage([frame]) frames.append(frame)