I have an app that loads a background image (floor plan) that I use as a canvas to draw on.
I am using the following to load the image:
but I need to get the aspect ration of the image so that I can reside Imageview3 to keep the same aspect ration based on the Imageview3 being the entire width of the screen.
How can I get the aspect ratio of the image before loading it?
I am using the following to load the image:
B4X:
If MAPfound = True Then
'dimension Imageview3 to the correct scale:
ImageView3.Bitmap = LoadBitmapSample(MAPfolder,MAPfile,ImageView3.width,ImageView3.height)
Else
ImageView3.SetBackgroundImage(Null)
End If
but I need to get the aspect ration of the image so that I can reside Imageview3 to keep the same aspect ration based on the Imageview3 being the entire width of the screen.
How can I get the aspect ratio of the image before loading it?