MediaPicker - RotateImage not working
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
### Description
I am using the latest changes to Media Picker in .NET 10.
I have noticed that when I turn RotateImage to true in MediaPickerOptions the following happens:
1. The image is not rotated.
2. The orientation information is reset.
I suspect the orientation information being reset is expected going by the documentation. It just took me a while to work out that this was a side effect of having RotateImage turned on.
### Steps to Reproduce
var options = new MediaPickerOptions
{
SelectionLimit = 0,
PreserveMetaData = true, Title="Take a photo",
RotateImage = true,
CompressionQuality=100,
MaximumWidth=1000,
MaximumHeight=1000
};
FileResult file = await MediaPicker.Default.CapturePhotoAsync(options);
### Link to public reproduction project repository
N/A
### Version with bug
10.0.20
### Is this a regression from previous behavior?
Not sure, did not test other versions
### Last version that worked well
Unknown/Other
### Affected platforms
iOS, Android
### Affected platform versions
Android 14
### Did you find any workaround?
Have to turn RotateImage off and manually rotate the image after capture.
### Relevant log output
```shell
```
Contributor guide
Research direction
Start with MediaPickerOptions.RotateImage and the MediaPicker.Default.CapturePhotoAsync implementations for Android and iOS, then trace how captured image orientation and metadata are handled. Reproduce the options shown in the issue on the affected platforms and verify that RotateImage rotates the image while the resulting orientation behavior is consistent with the documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp, ios
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100