cxzzcx
This commit is contained in:
parent
cfffe02625
commit
e3f3b7e7fa
1 changed files with 2 additions and 3 deletions
|
@ -20,7 +20,6 @@ def process_image(file=None, filename=None, resize=0):
|
|||
exif[k] = None
|
||||
del exif[k]
|
||||
i.info["exif"] = exif.tobytes()
|
||||
transposed = ImageOps.exif_transpose(i)
|
||||
|
||||
if resize:
|
||||
size = resize, resize
|
||||
|
@ -36,10 +35,10 @@ def process_image(file=None, filename=None, resize=0):
|
|||
|
||||
om = next(frames)
|
||||
om.info = i.info
|
||||
om.save(filename, format="WEBP", save_all=True, append_images=list(frames), loop=0, method=6, allow_mixed=True)
|
||||
om.save(filename, format="WEBP", save_all=True, append_images=list(frames), loop=0, method=6, allow_mixed=True, exif=exif)
|
||||
elif i.format.lower() != "webp":
|
||||
if i.format.lower() == "gif":
|
||||
gifwebp(input_image=filename, output_image=filename, option="-mixed -metadata none -f 100 -mt -m 6")
|
||||
else: i.save(filename, format="WEBP", method=6)
|
||||
else: i.save(filename, format="WEBP", method=6, exif=exif)
|
||||
|
||||
return f'/static{filename}'
|
Loading…
Add table
Add a link
Reference in a new issue