Various build fixes, cleanup and details #6
|
@ -1,4 +1,5 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import gc
|
||||||
import io
|
import io
|
||||||
import mimetypes
|
import mimetypes
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
@ -109,5 +110,7 @@ def process_video(path, *, maxsize, quality):
|
||||||
img = img.rotate(rot, expand=True)
|
img = img.rotate(rot, expand=True)
|
||||||
img.save(imgdata, format="webp", quality=quality, method=4)
|
img.save(imgdata, format="webp", quality=quality, method=4)
|
||||||
del img
|
del img
|
||||||
|
ret = imgdata.getvalue()
|
||||||
return imgdata.getvalue()
|
del imgdata
|
||||||
|
gc.collect()
|
||||||
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue
Block a user