fluffychat icon indicating copy to clipboard operation
fluffychat copied to clipboard

Images sent with "Send image" are scaled without appropriate interpolation

Open MoonlightWave-12 opened this issue 6 months ago • 1 comments

Bug Description

When one sends an image with "Send image", the image will be scaled down (or up), so that the longer sides are 1600 pixels long. This scaling seems to be done with "Nearest Neighbour"-interpolation, which results in an image with noticeable aliasing.

Test-image (original)

scaling-test-image (original)

After it was sent with "Send image"

scaling-test-image (send image)

Steps to Reproduce

  1. Open a chat.
  2. Select the + in the text-input-area.
  3. Choose "Send image".
  4. Make sure that "Send original" is off.
  5. Choose an image which is not already 1600 pixels long on the longer sides; preferably one with fine lines, to be able to see the difference more easily.

Expected Behavior

Fine lines in the sent image are smooth, similar to the original image.

App Version

1.21.2 (Flatpak)

Additional Platform Information

Debian GNU/Linux 12 (Bookworm)

Additional Context

Using bilinear-interpolation, or another, better type of interpolation, would noticeably improve the image-quality.

Original test-image scaled down with bilinear-interpolation

scaling-test-image (linear)

MoonlightWave-12 avatar Aug 27 '24 15:08 MoonlightWave-12