forked from MarseyWorld/MarseyWorld
master
parent
65dff1a335
commit
6ca734e699
|
@ -35,6 +35,9 @@ def upload_ibb(filepath=None, file=None, resize=False):
|
|||
om.info = i.info
|
||||
try: om.save(filepath, save_all=True, append_images=list(frames), loop=0, optimize=True, quality=30)
|
||||
except: return
|
||||
elif format != ".gif":
|
||||
i = IImage.open(filepath)
|
||||
i.save(filepath, optimize=True, quality=30)
|
||||
|
||||
try:
|
||||
with open(filepath, 'rb') as f:
|
||||
|
@ -72,7 +75,10 @@ def upload_imgur(filepath=None, file=None, resize=False):
|
|||
om = next(frames)
|
||||
om.info = i.info
|
||||
try: om.save(filepath, save_all=True, append_images=list(frames), loop=0, optimize=True, quality=30)
|
||||
except: return(None)
|
||||
except: return
|
||||
elif format != ".gif":
|
||||
i = IImage.open(filepath)
|
||||
i.save(filepath, optimize=True, quality=30)
|
||||
|
||||
try:
|
||||
with open(filepath, 'rb') as f:
|
||||
|
|
Loading…
Reference in New Issue