center user gifs when paused
This commit is contained in:
parent
eea03df833
commit
f3ba81486f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user