Skip to content
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

Image displays JPG photos taken in Portrait orientation in Landscape orientation (regression in 8.0.10) #21314

Closed
zeldafreak opened this issue Mar 19, 2024 · 5 comments · Fixed by #21458
Assignees
Labels
area-controls-image Image control fixed-in-8.0.40 fixed-in-9.0.0-preview.4.10690 i/regression This issue described a confirmed regression on a currently supported version p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@zeldafreak
Copy link

Description

After updating .NET MAUI from v8.0.7 to v8.0.10, photos taken in Portrait orientation on my iPad Pro (11", 4th-gen, iOS v17.4) using the built-in Camera app and rear-facing camera are displayed in Landscape orientation.

I'm able to reproduce this reliably by taking photos in the Camera app (or in a custom app that uses iOS APIs to take photos), but not with the MediaPicker, so my reproduction repository comes with a photo I took. I think this is because MediaPicker always returns the photo in PNG format, and this issue seems to only occur due to metadata (EXIF?) in the JPEG file.

You can reliably reproduce this issue by simply switching between 8.0.7 and 8.0.10. The screenshots below are from my reproduction repository, and the only difference between them is the .NET MAUI version the project is referencing.

If you just want an example image that can be used to reproduce this, you can find one here.

NOTE: This might affect other platforms/devices, but I'm specifically calling out iPad Pro because that's where I've reproduced it.

.NET MAUI v8.0.7

MAUI 8 0 7-tiny

.NET MAUI v8.0.10

MAUI 8 0 10-tiny

Steps to Reproduce

  • Take a photo on an iPad's rear-facing camera using the Camera app while holding the device in Portrait mode.
  • Save the photo to your library
    • It may be important that Settings -> Camera -> Formats is set to Most Compatible (not High Efficiency)
  • Create a new MAUI Application
  • Copy the JPG file from your Photo library into Resources\Images
  • Add an Image control that references your JPG file:
<Image
    Source="photo.jpg"
    HorizontalOptions="Fill"
    VerticalOptions="Fill"
    Aspect="AspectFit" />
  • Run the app and see that your photo is not displayed in Portrait mode.

Link to public reproduction project repository

https://github.com/zeldafreak/MauiImageRegression/tree/main

Version with bug

8.0.10 SR3

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.7 SR2

Affected platforms

iOS

Affected platform versions

iOS 17.4, iPad Pro (11", 4th-gen)

Did you find any workaround?

Rolling back to v8.0.7 restores the original behavior.

Relevant log output

No response

@zeldafreak zeldafreak added the t/bug Something isn't working label Mar 19, 2024
@Redth
Copy link
Member

Redth commented Mar 19, 2024

Looks like this could be the culprit: https://github.com/dotnet/maui/pull/19411/files#diff-48977a1f6983e847819315f0fcab9bc88a0bf15ba282e24616895a7c65713774R149

@PureWeen PureWeen added this to the .NET 8 SR4 milestone Mar 19, 2024
@PureWeen PureWeen added platform/iOS 🍎 p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint labels Mar 19, 2024
@jfversluis jfversluis added the i/regression This issue described a confirmed regression on a currently supported version label Mar 20, 2024
@MitchBomcanhao
Copy link

here to report a similar thing.
the captured images all have the same orientations on 8.0.7 and 8.0.10, but when loading them up to be displayed they all have the wrong orientation on 8.0.10, so this is quite broken.

@RoiChen001
Copy link

Can repro this issue at iOS device on the latest 17.10 preview2(8.0.10 and Microsoft.Maui.Controls 8.0.20-nightly.10336+sha.d03a2c66aa-azdo.9265184).

@RoiChen001 RoiChen001 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Mar 21, 2024
@PureWeen PureWeen moved this from Todo to In Progress in MAUI SDK Ongoing Mar 27, 2024
@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 28, 2024
@rodrigoavots
Copy link

The same problem occurs on Android
Version 11 and 12 are ok, Android 13 is rotating 90º

@PureWeen PureWeen modified the milestones: .NET 8 SR4, .NET 8 SR5 Apr 9, 2024
@PureWeen
Copy link
Member

PureWeen commented Apr 9, 2024

The same problem occurs on Android Version 11 and 12 are ok, Android 13 is rotating 90º

can you log a new issue with a repro?

@github-project-automation github-project-automation bot moved this from In Progress to Done in MAUI SDK Ongoing Apr 14, 2024
@Eilon Eilon added area-controls-image Image control and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels May 13, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-image Image control fixed-in-8.0.40 fixed-in-9.0.0-preview.4.10690 i/regression This issue described a confirmed regression on a currently supported version p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

10 participants