Disable optim. when recompressing clipboard PNG

Far too slow for big (10MB+) PNG
This commit is contained in:
miruka 2020-07-21 23:09:07 -04:00
parent 1c218c82ec
commit 286b7a951a
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
- Image viewer:
- hflickable: support kinetic scrolling disabler
- settings
- compress png in a thread
- verify upload cancellation

View File

@ -598,7 +598,7 @@ class MatrixClient(nio.AsyncClient):
async def get_path() -> Path:
with io.BytesIO(image) as inp, io.BytesIO() as buffer:
PILImage.open(inp).save(buffer, "PNG", optimize=True)
PILImage.open(inp).save(buffer, "PNG")
async with aiofiles.open(temp.name, "wb") as file:
await file.write(buffer.getvalue())