master
Aevann1 2021-09-11 18:21:42 +02:00
parent 92e20c6ce3
commit fbb0891ba3
1 changed files with 0 additions and 4 deletions

View File

@ -34,14 +34,12 @@ def upload_ibb(filepath=None, file=None, resize=False):
om = next(frames)
om.info = i.info
filepath = f"image.{i.format}"
try: om.save(filepath, save_all=True, append_images=list(frames), loop=0, optimize=True, quality=30)
except Exception as e:
print(e)
return
elif format != "gif":
i = IImage.open(filepath)
filepath = f"image.{i.format}"
i.save(filepath, optimize=True, quality=30)
try:
@ -81,14 +79,12 @@ def upload_imgur(filepath=None, file=None, resize=False):
om = next(frames)
om.info = i.info
filepath = f"image.{i.format}"
try: om.save(filepath, save_all=True, append_images=list(frames), loop=0, optimize=True, quality=30)
except Exception as e:
print(e)
return
elif format != "gif":
i = IImage.open(filepath)
filepath = f"image.{i.format}"
i.save(filepath, optimize=True, quality=30)
try: