Fix #5711 Incorrect rotation in Edit Image while uploading. #5760
Fix #5711 Incorrect rotation in Edit Image while uploading. #5760acemarco1311 wants to merge 1 commit intocommons-app:mainfrom
Conversation
|
Hi Toan, Would you mind checking whether your change works with all JPGs at https://github.com/recurser/exif-orientation-examples ? Thanks! 🙂 I feel like different pictures have different properties, and what works for one picture might not work for another. Idea potentially for another pull request: |
|
Yeah, it seems buggy (unless I messed up compilation). I've tried to build this PR against master (beta APK available at https://github.com/mnalis/apps-android-commons/actions/runs/13313689246). There seems to be at least one additional issue: For example, this image has physical layout correct (landscape), but contains EXIF
|
|
@acemarco1311 do you any idea why the PR does not (fully) solve the rotation issue? Do you intend to continue working on this PR? |
|
@nicolas-raoul this is fixed as part of issue #5711 and the related commennt is : #6642 (comment) |
|
@Kota-Jagadeesh Thanks! @mnalis By any chance if you have time, would you mind checking? :-) |

Description (required)
Fixes #5711. While uploading, when click "Edit Image" and then perform no rotation (click Save, or click Rotate 4 times to get back to the original position and Save), the image will be automatically rotated 90 degrees.
What changes did you make and why?
Change rotateImage() function implementation in
edit/TransformImageImpl.kt. When the given degree is not expected (e.g 0), the transformation of the image should be default instead of rotating 90 degree (LLJTran.ROT_90).Tests performed (required)
Tested on Pixel 8 with API level 35.
Reproduce:
Error Behavior:
error_final.mp4
Expected Behavior:
The image will be shown as original instead of being rotated 90 degree after clicking "Save".
Screenshots (for UI changes only)
expected_final.mp4