fix: Better thumbnails

This checks if the image is png or
jpg and therefore doesnt remove
transparancy. It also encodes
thumbnails with higher resolution
to make them less ugly.
This commit is contained in:
Krille Fear 2021-12-12 12:03:58 +01:00
commit 768720e22d
2 changed files with 15 additions and 7 deletions

View file

@ -36,7 +36,7 @@ class _SendFileDialogState extends State<SendFileDialog> {
if (file is MatrixImageFile &&
!origImage &&
file.bytes.length > minSizeToCompress) {
file = await file.resizeImage(quality: 40, max: 1200);
file = await file.resizeImage();
}
await widget.room.sendFileEventWithThumbnail(file);
}