Skip to content

[BUG] CamaraView Photo Rotate #2096

@AugPav

Description

@AugPav

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

Under certain circumstances photos are taken and displayed rotated.
Landscape
Portrait

Expected Behavior

Photos are expected to be saved/returned with the same orientation as they were captured with cameraview.

Steps To Reproduce

Using (https://github.com/CommunityToolkit/Maui/blob/main/samples/CommunityToolkit.Maui.Sample/Pages/Views/CameraView/CameraViewPage.xaml.cs)

How to reproduce the error?

1 - Position your device in portrait and do not turn the device until further notice.
2 - Enter CameraView Page
3 - Take a photo --> the photo will be displayed correctly in the image.
4 - Put the device in landscape
5 - Take a photo --> the photo will be displayed incorrectly in the image.

Take the photo without errors.

1 - Position your device in portrait and do not turn the device until further notice.
2 - Touch CameraView Page
3 - Take a photo --> the photo will be displayed correctly in the image.
4 - Exit the CameraViewPage
5 - Put the device in landscape
6 - Enter CameraView Page
3 - Take a photo --> the photo will be displayed correctly in the image.

The problem is that when taking the photo it saves the exif horientation that the device had before entering the CameraViewPage. At least that is my conclusion.

Link to public reproduction project repository

https://github.com/CommunityToolkit/Maui/blob/main/samples/CommunityToolkit.Maui.Sample/Pages/Views/CameraView/CameraViewPage.xaml.cs

Environment

- .NET MAUI CommunityToolkit:8.0.1
- OS:Windows 10 Build 10.0.19041.0
- .NET MAUI: 8.0
. (Samsung Flip 5 Android 14 / Samsung S24 Android 14 / Samsung Galaxy A03 Core Android 13  )

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Camera 📸Issue/PR associated with the Camera packagebugSomething isn't workingunverified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions