master
Aevann1 2021-09-10 06:14:52 +02:00
parent 65dff1a335
commit 6ca734e699
1 changed files with 7 additions and 1 deletions

View File

@ -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: