Open tschbc opened 1 month ago
@brminnick thoughts?
In my journey to try fix this in my project, most resources I've found are for .NET Framework, have a dependency on Windows' System.Drawing namespace, or juggling byte arrays of metadata and "magic values" that I feel is too much of a rabbit hole for me currently.
There's an additional problem: if I write EXIF tags to the image after it's created, it gets re-compressed (using the only library I could find that fits my project).
Hello guys, anything on this? I can confirm this bug is really there, and believe it is also linked to (causes) this issue
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
CameraView always sets
upper-right
to EXIF orientation tag on iOS.Expected Behavior
CameraView should set the correct orientation value to the EXIF orientation tag.
Steps To Reproduce
We need to view the EXIF tags after creating a photo. The steps below are what I am somewhat familiar with, so if you have a better/easier method, use that.
[IO.File]::WriteAllBytes($path, [Convert]::FromBase64String(<base64 string or Get-Content from file>))
file <filepath>
from bash from Git for Windows)Link to public reproduction project repository
https://github.com/tschbc/CameraViewOrientationUpperRightIssue
Environment
Anything else?
If you track the device's current rotation yourself and rotate the image data (using something like ImageSharp), then you can correctly orient the picture outside of iOS. It will still be incorrectly rotated in MAUI Image views as long as the orientation value remains.
There are other issues with the CameraView that I may re-use this repro repository for (e.g.
StartCameraPreview
throws exceptions when taking a picture, and even if you catch those, rapidly taking pictures (as a user, not in code) throws exceptions that cannot be caught, crashing the app.