forked from MarseyWorld/MarseyWorld
master
parent
e18dac8f40
commit
b3366f5b69
|
@ -34,11 +34,10 @@ def upload_ibb(file=None, resize=False):
|
|||
om.info = i.info
|
||||
om.save("image.webp", save_all=True, append_images=list(frames), loop=0)
|
||||
else:
|
||||
if i.format.lower() == "gif": gifwebp(input_image="image.webp", output_image="image.webp")
|
||||
if i.format.lower() == "gif": gifwebp(input_image="image.webp", output_image="image.webp", option="-q 80")
|
||||
else: i.save("image.webp")
|
||||
|
||||
|
||||
|
||||
with open("image.webp", 'rb') as f:
|
||||
data={'image': base64.b64encode(f.read())}
|
||||
req = requests.post(f'https://api.imgbb.com/1/upload?key={IBB_KEY}', data=data)
|
||||
|
|
Loading…
Reference in New Issue