signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.64k stars 6.16k forks source link

HEIC Pictures taken in portrait mode will be rotated in the Signal gallery #10493

Open Rouzax opened 3 years ago

Rouzax commented 3 years ago

Bug description

Pictures taken in portrait mode will be rotated in the Signal gallery, I have screen rotation enabled, so it is not similar to the other bugs.

Steps to reproduce

Actual result: Pictures taken in portrait mode will be rotated in the Signal gallery Expected result: Pictures should have right orientation

Screenshots

Original photo 20210111_143903

Exif Info

``` ExifTool Version Number : 12.14 File Name : 20210111_143903.jpg Directory : C:/Temp File Size : 82 KiB File Modification Date/Time : 2021:01:11 14:40:46+01:00 File Access Date/Time : 2021:01:11 14:49:46+01:00 File Creation Date/Time : 2021:01:11 14:40:46+01:00 File Permissions : rw-rw-rw- File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg JFIF Version : 1.01 Exif Byte Order : Little-endian (Intel, II) Make : samsung Camera Model Name : SM-G970F Orientation : Horizontal (normal) X Resolution : 72 Y Resolution : 72 Resolution Unit : inches Software : G970FXXS9DTK9 Modify Date : 2021:01:11 14:39:03 Y Cb Cr Positioning : Centered Exposure Time : 1/50 F Number : 1.5 Exposure Program : Program AE ISO : 400 Exif Version : 0220 Date/Time Original : 2021:01:11 14:39:03 Create Date : 2021:01:11 14:39:03 Shutter Speed Value : 1 Aperture Value : 1.5 Exposure Compensation : 0 Max Aperture Value : 2.4 Metering Mode : Center-weighted average Flash : No Flash Focal Length : 4.3 mm Color Space : sRGB Exif Image Width : 1276 Exif Image Height : 2268 Exposure Mode : Auto White Balance : Auto Digital Zoom Ratio : 1 Focal Length In 35mm Format : 26 mm Scene Capture Type : Standard Image Unique ID : 758f17a9c43ca6650000000000000000 GPS Version ID : 2.2.0.0 GPS Latitude Ref : North GPS Longitude Ref : East GPS Altitude Ref : Above Sea Level Compression : JPEG (old-style) Thumbnail Offset : 908 Thumbnail Length : 2718 Image Width : 1276 Image Height : 2268 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2) Aperture : 1.5 Image Size : 1276x2268 Megapixels : 2.9 Scale Factor To 35 mm Equivalent: 6.0 Shutter Speed : 1/50 Thumbnail Image : (Binary data 2718 bytes, use -b option to extract) GPS Latitude : GPS Longitude : Circle Of Confusion : 0.005 mm Field Of View : 69.4 deg Focal Length : 4.3 mm (35 mm equivalent: 26.0 mm) GPS Position : Hyperfocal Distance : 2.49 m Light Value : 4.8 ```

Screenshot from Google Photos TMrtksQWEi

Screenshot from Signal gallery image

Device info

Device: Samsung Galaxy S10se (SM-G970F) Android version: 10 Signal version: 5.0.8

Link to debug log

schmeat commented 3 years ago

Accidentally made a duplicate entry: https://github.com/signalapp/Signal-Android/issues/10516. Seems to be an issue with HEIC file type, at least in my case.

Rouzax commented 3 years ago

That could very well be my issue as well. My phone also stores them as HEIC.

deltaclock commented 3 years ago

Same issue here for Samsung Galaxy S20FE. Pictures are rotated 90 degrees, removing the exif orientation tag had no effect.

I attach below the original heic image and some screenshots of how its shown in Signal. image.heic.zip

Screenshot_20210325-181056_Signal

Screenshot_20210325-181100_Signal

deltaclock commented 3 years ago

Did some digging and saw Glide is being used to convert the heic image to jpeg here.

Based on the thread issue on Glide github here i suggest maybe to fix this issue, we need to update exifinterface to the latest version or update glide to version 4.12.

Change here and here

stale[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

schmeat commented 2 years ago

Yes this is an issue still. I suppose dev priorities are the only blocker.

NickEckardt commented 2 years ago

I am also experiencing this issue on the galaxy S22.

liesnikov commented 2 years ago

Not sure if the cause is the same, but attaching two HEIC pictures in a row is also problematic.

  1. It takes a ridiculously long time (>10s) to show up in a "pre-send" edit gallery.
  2. When it does, the rotation behaviour is wrong -- the picture is placed on a black background with the original (I think?) pic ratio.
VadimMuhtarov commented 2 years ago

Same issue on my Galaxy A70, Android 11, Signal 5.34.10

joomkra commented 2 years ago

1,5 year pass and this doesn't seem to have been seen by the devs. Sending emails to support also get ignored. My photos on my S21 are always sideways or upside-down. Signal is the only app having this issue.

UserX404 commented 2 years ago

Correlating dev comment: https://community.signalusers.org/t/beta-feedback-for-the-upcoming-android-5-40-release/44641/54

captainR0bbo commented 2 years ago

Keeping issue alive. Confirmed issue on galaxy S22. No issue on iOS with heic

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

VadimMuhtarov commented 2 years ago

Can't reproduce it now, looks like it was fixed

alex-signal commented 2 years ago

@VadimMuhtarov Are you on the newest beta? (5.49)

VadimMuhtarov commented 2 years ago

No, production build 5.48.3

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

cody-signal commented 2 years ago

We have a world of issues with HEIC images, it's something we are aware of and wanting to fix, but hasn't made it to the top of our priority.