Reduce + recode images to JPEG if they are too huge (#3956)

I.e. > 500K for the balanced media quality and 130K for the worse one. This can remove animation and
transparency from PNG/WebP, but then a user always can send an image as a file.

Also don't reduce wide/high images if they aren't huge. Among other benefits, this way most of PNG
screenshots aren't touched.

Also remove Exif from all images, not from JPEGs only.
This commit is contained in:
iequidoo
2023-02-21 17:55:36 -03:00
committed by iequidoo
parent 350509d5d1
commit 430a71288f
6 changed files with 178 additions and 137 deletions

View File

@@ -22,6 +22,8 @@
in favor of `get_next_msgs()` and `wait_next_msgs()`.
- New Python bindings API `Account.wait_next_incoming_message()`.
- New Python bindings APIs `Message.is_from_self()` and `Message.is_from_device()`.
- Remove metadata from avatars and JPEG images before sending #4037
- Reduce + recode images to JPEG if they are > 500K in size #4037
### Fixes
- Fix python bindings README documentation on installing the bindings from source.
@@ -113,7 +115,6 @@
- Run `cargo-deny` in CI. #4101
- Check provider database with CI. #4099
- Switch to DEFERRED transactions #4100
- Remove metadata from avatars and JPEG images before sending #4037
### Fixes
- Do not block async task executor while decrypting the messages. #4079