Hi Everyone,
I recently found a bug within my app. The problem is that the phone it is deployed on has a camera which is able to capture images with pixels more than the limit on OpenGLRenderer. Having said that that means Images from the server coming down to the app that is bigger than the limit will also not show.
Bitmap too large to be uploaded into a texture (5000x5000, max=4096x4096)
My first thought is to scale the image down proportionately so it doesn't get stretched.
Currently the image is being set as a Xamarin.Forms.Image object
Image _image = new Image()
{
Source = file.Path,
VerticalOptions = LayoutOptions.CenterAndExpand,
Aspect = Aspect.Fit
};
I assumed that setting the Aspect to Fit would have maybe tried to scale it to fit the screen - it was hopeful.
I then proceeded to try _image.Scale = 0.5 but that didn't do anything. I got the same size in the debug log.
I was wondering if there are an easier way to scale Xamarin.Forms.Image...