Skip to content

Fix the orientation of sent images #1190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 30, 2023

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Aug 30, 2023

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Read EXIF metadata for orientation before decoding the bitmap, from another InputStream. This gives us a correct orientation value and should rotate the image to send as needed.

Motivation and context

Fixes #1134 .

Tests

On some devices, sending a picture that was just taken from the camera is enough. I couldn't reproduce this in my device, so the alternate solution I found was:

Tested devices

  • Physical
  • Emulator
  • OS version(s): 11

Checklist

@jmartinesp jmartinesp requested a review from a team as a code owner August 30, 2023 13:09
@jmartinesp jmartinesp requested review from bmarty and removed request for a team August 30, 2023 13:09
@github-actions
Copy link
Contributor

github-actions bot commented Aug 30, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/Z5oF1W

@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01% ⚠️

Comparison is base (4a88e3f) 57.31% compared to head (125adfc) 57.30%.
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1190      +/-   ##
===========================================
- Coverage    57.31%   57.30%   -0.01%     
===========================================
  Files         1044     1044              
  Lines        27113    27117       +4     
  Branches      5599     5602       +3     
===========================================
  Hits         15540    15540              
- Misses        9144     9148       +4     
  Partials      2429     2429              
Files Changed Coverage Δ
...nt/android/libraries/androidutils/bitmap/Bitmap.kt 0.00% <0.00%> (ø)
.../libraries/mediaupload/AndroidMediaPreProcessor.kt 0.00% <0.00%> (ø)
...t/android/libraries/mediaupload/ImageCompressor.kt 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@jmartinesp jmartinesp enabled auto-merge (squash) August 30, 2023 16:32
@jmartinesp jmartinesp force-pushed the fix/jme/1134-fix-orientation-of-sent-images branch from 0900277 to 31d2c84 Compare August 30, 2023 16:41
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@jmartinesp jmartinesp merged commit 1d3d1fe into develop Aug 30, 2023
@jmartinesp jmartinesp deleted the fix/jme/1134-fix-orientation-of-sent-images branch August 30, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Taking photos in-app makes them go sideways
2 participants