fixed GIF issue
This commit is contained in:
parent
98f2b82ed8
commit
d001f5a28c
@ -2795,25 +2795,25 @@ class StockTicker():
|
||||
|
||||
if ind == 0 and all_settings['title']:
|
||||
|
||||
title_img = self.openImage('feature_titles/gifs.png')
|
||||
#title_img = self.openImage('feature_titles/gifs.png')
|
||||
|
||||
for i, frame in enumerate(ImageSequence.Iterator(GIF)):
|
||||
frame = frame.convert('RGB')
|
||||
frame.thumbnail((128, 32))
|
||||
frame = frame.convert('P')
|
||||
frame.thumbnail((128, 32),Image.NEAREST)
|
||||
|
||||
f = self.stitchImage([title_img, frame])
|
||||
frames.append(f)
|
||||
#f = self.stitchImage([title_img, frame])
|
||||
frames.append(frame)
|
||||
|
||||
else:
|
||||
|
||||
for i, frame in enumerate(ImageSequence.Iterator(GIF)):
|
||||
|
||||
frame = frame.convert('RGB')
|
||||
frame.thumbnail((128, 32))
|
||||
frame = frame.convert('P')
|
||||
frame.thumbnail((128, 32),Image.NEAREST)
|
||||
|
||||
#frame = frame.resize((99999, 32))
|
||||
f = self.stitchImage([frame])
|
||||
frames.append(f)
|
||||
#f = self.stitchImage([frame])
|
||||
frames.append(frame)
|
||||
|
||||
|
||||
frames[0].save('./display_images/working_gif{}.gif'.format(str(ind)), save_all=True, append_images=frames[1:], loop=0, optimize = False)
|
||||
|
Loading…
Reference in New Issue
Block a user