forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-10-03 23:53:26 +02:00
parent 7a1cad5492
commit 7905ed0dd9
2 changed files with 1 additions and 5 deletions

View File

@ -21,12 +21,8 @@ def process_image(filename=None, resize=False):
om = next(frames)
om.info = i.info
om.save(filename, format="WEBP", save_all=True, append_images=list(frames), loop=0)
sex = IImage.open(filename)
print(sex.format)
elif i.format.lower() != "webp":
if i.format.lower() == "gif": gifwebp(input_image=filename, output_image=filename, option="-q 80")
else: i.save(filename, format="WEBP")
sex = IImage.open(filename)
print(sex.format)
return filename

View File

@ -539,7 +539,7 @@ def settings_images_banner(v):
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}.gif'
file.save(name)
imageurl = DOMAIN + process_image(name)
imageurl = request.host_url[:-1] + process_image(name)
if imageurl:
v.bannerurl = imageurl