fd
This commit is contained in:
parent
3eb99d980a
commit
862fef0d5c
1 changed files with 1 additions and 2 deletions
|
@ -19,11 +19,10 @@ def upload_ibb(file=None, resize=False):
|
||||||
frames = ImageSequence.Iterator(i)
|
frames = ImageSequence.Iterator(i)
|
||||||
|
|
||||||
if resize:
|
if resize:
|
||||||
size = 100, 100
|
|
||||||
def thumbnails(frames):
|
def thumbnails(frames):
|
||||||
for frame in frames:
|
for frame in frames:
|
||||||
thumbnail = frame.copy()
|
thumbnail = frame.copy()
|
||||||
: thumbnail.thumbnail(size, IImage.ANTIALIAS)
|
: thumbnail.thumbnail(100, 100, IImage.ANTIALIAS)
|
||||||
yield thumbnail
|
yield thumbnail
|
||||||
|
|
||||||
frames = thumbnails(frames)
|
frames = thumbnails(frames)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue