forked from MarseyWorld/MarseyWorld
fdgd
parent
7a1cad5492
commit
7905ed0dd9
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue