79547608

Date: 2025-04-01 02:30:06
Score: 1.5
Natty:
Report link

After testing, I used .net 9.0 Maui to display the image on Android 15 with the following code, and there was no rotation problem.

You can refer to the following code snippet.

try
{
    var photo = await MediaPicker.CapturePhotoAsync();
    if (photo != null)
    {
        var newFile = Path.Combine(FileSystem.CacheDirectory, photo.FileName);
        using (var stream = await photo.OpenReadAsync())
        using (var newStream = File.OpenWrite(newFile))
            await stream.CopyToAsync(newStream);
 
        profileImage.Source = newFile;
    }
}
catch (Exception ex)
{
    Console.WriteLine($"CapturePhotoAsync THREW: {ex.Message}");
}

Best Regards,

Alec Liu.


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Reasons:
  • Blacklisted phrase (0.5): Best Regards
  • Blacklisted phrase (1): Regards
  • Blacklisted phrase (0.5): upvote
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: YonglunLiu