riot-android
riot-android copied to clipboard
photo with exif orientation is not rotated in the chat view
I just uploaded a portrait photo taken by my camera via file upload of vector-web. In the chat view of vector-android, the photo is displayed in landscape mode, but when I tap on it to get it in fullscreen, it's orientated correctly.
I checked that the exif orientation is correct with:
> identify -verbose <photo.jpg> | grep exif:Orientation
exif:Orientation: 8
which is the right setting according to the diagrams at http://sylvana.net/jpegcrop/exif_orientation.html.
Similar issue for vector-web: https://github.com/vector-im/vector-web/issues/1999
Note: This happens with current stable 0.3.4 as well as with jenkins build 606 for master.
There was already an issue reported on the server side.
The android client requests a thumbnail to the server to display it in the room history : it should be properly rotated by the server. ( the exif might not be defined). The high res / genuine image is properly managed because the android client applies the exif rotation. You should not have this issue if the picture is sent from the android client because the exif rotation is applied before uploading it to avoid having this issue on other clients.
I see. I just checked the thumbnail resource from the server and it does not contain any exif information - so there's nothing the android client could do better here until the server either rotates the thumbnails or includes exif orientation, I guess. :sparkles:
@ylecollen I can't find the issue you mention for the server side though, could you provide a link?
I did some tests again, and I think that this is an Riot-Web issue. When sending the picture with Riot-Android or RiotX, the orientation will be correct, also in Riot-Web. When sending it with Riot-Web, the orientation will be wrong in the preview window already, and also on all other devices.
So I think it should be possible to close this issue, and focus on that one instead: https://github.com/vector-im/riot-web/issues/1999