fd
This commit is contained in:
parent
2187448e0e
commit
0da221b9b1
1 changed files with 1 additions and 2 deletions
|
@ -34,11 +34,10 @@ def upload_ibb(file=None, resize=False):
|
||||||
om.info = i.info
|
om.info = i.info
|
||||||
om.save("image.webp", save_all=True, append_images=list(frames), loop=0)
|
om.save("image.webp", save_all=True, append_images=list(frames), loop=0)
|
||||||
else:
|
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")
|
else: i.save("image.webp")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
with open("image.webp", 'rb') as f:
|
with open("image.webp", 'rb') as f:
|
||||||
data={'image': base64.b64encode(f.read())}
|
data={'image': base64.b64encode(f.read())}
|
||||||
req = requests.post(f'https://api.imgbb.com/1/upload?key={IBB_KEY}', data=data)
|
req = requests.post(f'https://api.imgbb.com/1/upload?key={IBB_KEY}', data=data)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue