matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.81k stars 2.13k forks source link

"Squashed" thumbnails with EXIF rotation metadata #6046

Open Ezwen opened 5 years ago

Ezwen commented 5 years ago

Description

(I originally submitted a bug for riot-web here: https://github.com/vector-im/riot-web/issues/10903)

Consider a picture with EXIF rotation metadata (eg. a photo taken with a phone that was not turned 90° on the side), such as:

IMG_20190915_082630

When opened in an application that takes into account EXIF rotation metadata, we see this:

Capture d’écran du 2019-09-18 07-53-18

However when we upload this picture in Riot, the thumbnail shows this:

Capture d’écran du 2019-09-18 07-54-38

Steps to reproduce

Version information

richvdh commented 5 years ago

I guess this is a bug in #5039.

fbruetting commented 4 years ago

For me, the thumbnail in riot-web has the correct framesize (upright image), but the image data inside that frame is landscape-oriented – and therefore heavily distorted.

Bildschirmfoto von 2019-12-04 15-48-36

When I then click on it, the frame gets rotated (so that both the frame and the image data are landscape – so that it doesn’t get stretched/squeezed anymore, but the orientation still is wrong. Instead, the image data should have been rotated – so that both the frame and the image are upright.

Bildschirmfoto von 2019-12-04 15-54-40