signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.16k stars 2.57k forks source link

3768x3768 JPEG image (553 kB) got downscaled to 3072x3072 in high-quality mode #6893

Closed EwoutH closed 1 week ago

EwoutH commented 4 weeks ago

Using a supported version?

Overall summary

A 3768x3768 JPEG image of 553 kB got downsized to 3072x3072 in high-quality mode.

If I read this logic correctly, that shouldn't be the case, as long as it's under 4096 by 4096 and under 3 MB.

https://github.com/signalapp/Signal-Desktop/blob/4aa898f4953c8e0ab3af83c02207dfaeb30498f5/ts/util/scaleImageToLevel.ts#L30-L53

I would expect that I. WhatsApp high quality even allows images of ~5400 pixels wide to be shared in high quality mode.

(can't share the image unfortunately).

Steps to reproduce

  1. Send a JPEG image under 1MB
  2. Observe compression

Expected result

Full quality image

Actual result

Compressed image

Screenshots

No response

Signal version

7.11.0

Operating system

Windows 11

Version of Signal on your phone

No response

Link to debug log

No response

EwoutH commented 4 weeks ago

Or does the thresholdSize: 0.4 * MiB part mean that everything under 0.4 MiB (~419 kB) will be downsided? Because that's very low for a high-definition image.

scottnonnenberg-signal commented 1 week ago

Yes, resizing logic does take effect when the overall size of the original message is over threshholdSize.

The numbers are as they are to give global and primarily mobile Signal users a good experience. Images can be very large, and global data plans are often limited.

EwoutH commented 6 days ago

Where could we further discuss these numbers/tiers?

scottnonnenberg-signal commented 4 days ago

The forums are the best place to talk through the details of designs, desired features: https://community.signalusers.org/c/beta-feedback/25