I'm creating PictureMarkerSymbols from photos that my user selected. I'm creating them using a Uri pointing to the data file. The problem I'm running into is that the photo is coming in rotated incorrectly. I'm able to get the width and height of the photo using the following (this needs to run on iOS and Android):
using IImage = Microsoft.Maui.Graphics.IImage;
IImage? image = null;
using (Stream stream = File.OpenRead(<path to image>))
{
image = PlatformImage.FromStream(stream);
//Now I have image width and height so I can see if the image is landscape or portrait; and change aspect accordingly
}
The code above works on any platform. But I'm not sure how to get the proper orientation as a PictureMarkerSymbol. Ideas?
Note: I can stick it in an ImageSource which works perfectly.