Wednesday, October 7, 2026
HomeiOS Developmentc# - MediaPicker.CapturePhotoAsync() Picture rotated 90 diploma

c# – MediaPicker.CapturePhotoAsync() Picture rotated 90 diploma

[ad_1]

After I Seize a Picture with the next code , I get the saved picture rotated 90 diploma clockwise in Android and iOS

is there any answer for this difficulty? so I get the saved picture orientation adjusted correctly

FileResult picture = await MediaPicker.CapturePhotoAsync();
utilizing Stream sourceStream = await picture.OpenReadAsync();
var image = PlatformImage.FromStream(sourceStream);

string localFilePath = $"{FileSystem.CacheDirectory}/{picture.FileName}";
utilizing FileStream localFileStream = File.OpenWrite(localFilePath);
await image.SaveAsync(localFileStream, ImageFormat.Jpeg, high quality: 0.90f);

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments