telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.37k stars 5.24k forks source link

JXL encoding support on client side, disable image compression for personal chat #28684

Closed kupitmanzv closed 30 minutes ago

kupitmanzv commented 11 hours ago

Is your feature request related to a problem?

partially. Telegram is currently inconvenient for exchanging images and videos, especially from mobile devices.

Describe the solution you'd like

Client-Server-Client side JXL. Client-1 encode, Server transfer to, Client-2 decode+encode to png or save in .jxl By default send uncompressed or lossless compressed images in personal chats, add traffic saving mode for force compression. Ideally complete replacement of jpg with jxl for lossless compression, or avif for force traffic saving.

Describe alternatives you've considered

don't see alternatives

Additional context

  1. Regarding the first, since Telegram initially added the JXL decoder, and on the desktop it even works without additional settings, based on this you can add an encoder in lossless mode on the client side. In addition to optimizing the traffic of TG servers, you can add a setting for saving in .jxl by a second client, which will give an impetus to support the format.

  2. Remove image compression in personal chats/notes, this only spoils the images without much savings (most of the traffic comes from channels, or am I wrong?), at the same time, expand lossless images to full size (as is done with compressed ones), and add they have a postscript "lossless" or something like that in the upper corners. This is as funny as possible when a greedy discord with subscriptions for $10, and with file size restrictions, does not compress images/videos, but telegrams do.

Thanks.

ilya-fedin commented 4 hours ago

based on this you can add an encoder in lossless mode on the client side

It's not possible, the Photo message type accepts only jpegs. Support has to be added on server first