Skip to content

[camera_android_camerax] Fix incorrectly rotated captured photos #9498

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 6 commits into from
Jun 29, 2025

Conversation

camsim99
Copy link
Contributor

@camsim99 camsim99 commented Jun 25, 2025

Changes the target rotation of captured images to match that of the default display at the time of capture. This ensures that the photo's orientation is upright. This in turn fixes the rotation of the thumbnail previewing a captured photo (the thumbnail was never rotated incorrectly, just the image itself).

Fixes flutter/flutter#169876.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@camsim99 camsim99 changed the title [camera_android_camerax] Fix incorrectly rotated photos in thumbnail preview [camera_android_camerax] Fix incorrectly rotated captured photos Jun 26, 2025
@camsim99 camsim99 marked this pull request as ready for review June 26, 2025 22:10
@camsim99 camsim99 requested review from jesswrd and a team June 26, 2025 22:11
@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 26, 2025
@auto-submit auto-submit bot merged commit 48c9498 into flutter:main Jun 29, 2025
78 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 30, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 30, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jun 30, 2025
flutter/packages@4841ada...471bfd3

2025-06-30 [email protected] [google_maps_flutter] Remove legacy
renderer tests (flutter/packages#9517)
2025-06-30 49699333+dependabot[bot]@users.noreply.github.com Bump
lewagon/wait-on-check-action from 1.3.4 to 1.4.0 in the
all-github-actions group (flutter/packages#9524)
2025-06-29 [email protected]
[camera_android_camerax] Fix incorrectly rotated captured photos
(flutter/packages#9498)
2025-06-29 [email protected] [in_app_purchase] Annotate
deprecation in test (flutter/packages#9473)
2025-06-29 [email protected] [video_player] Add poster attribute for
html video tag in video_player_platform_interface
(flutter/packages#8979)
2025-06-29 [email protected] Roll Flutter (stable) from
6fba244 to fcf2c11 (6 revisions) (flutter/packages#9502)
2025-06-29 [email protected] Skip test to unblock packages
(flutter/packages#9516)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
mboetger pushed a commit to mboetger/flutter that referenced this pull request Jul 21, 2025
…r#171384)

flutter/packages@4841ada...471bfd3

2025-06-30 [email protected] [google_maps_flutter] Remove legacy
renderer tests (flutter/packages#9517)
2025-06-30 49699333+dependabot[bot]@users.noreply.github.com Bump
lewagon/wait-on-check-action from 1.3.4 to 1.4.0 in the
all-github-actions group (flutter/packages#9524)
2025-06-29 [email protected]
[camera_android_camerax] Fix incorrectly rotated captured photos
(flutter/packages#9498)
2025-06-29 [email protected] [in_app_purchase] Annotate
deprecation in test (flutter/packages#9473)
2025-06-29 [email protected] [video_player] Add poster attribute for
html video tag in video_player_platform_interface
(flutter/packages#8979)
2025-06-29 [email protected] Roll Flutter (stable) from
6fba244 to fcf2c11 (6 revisions) (flutter/packages#9502)
2025-06-29 [email protected] Skip test to unblock packages
(flutter/packages#9516)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
vashworth pushed a commit to vashworth/packages that referenced this pull request Jul 30, 2025
…tter#9498)

Changes the target rotation of captured images to match that of the default display at the time of capture. This ensures that the photo's orientation is upright. This in turn fixes the rotation of the thumbnail previewing a captured photo (the thumbnail was never rotated incorrectly, just the image itself).

Fixes flutter/flutter#169876.

## Pre-Review Checklist

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: camera
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[camera_android_camerax] thumbnail of taken photo orientation is incorrect if app starts in landscape mode
3 participants