Perhaps I am just dense in the new year. Not sure why ... didn't even drink last nigh
. Anyway, the issue is that I am trying to use the following code to pull an image from SQL, rotate it so that it shows as portrait the way it was taken, and fill the imageview:
If I use Content Mode of Center, the imageview (flashCards) displays the canvas the correct size of the flashCards imageview dimensions. But, the image itself is cropped ... it's too big and doesn't show all of it.
If I use a Content Mode of Fill. the the imageview (flashCards) displays the canvas too short and wide. But, the image itself is all shown. Like it's compressed.
Any thoughts?
Thanks!
B4X:
Buffer = rs.GetBlob("picture")
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
returnedPic.Initialize2(InputStream1)
'flashCards.Bitmap = returnedPic 'For testing without rotation
canvas1.Initialize(flashCards)
Rect.Initialize(0,0, imgRt, imgBt)
canvas1.DrawBitmapRotated(returnedPic, Rect, 90) 'Rotates image after retrieve from SQL
canvas1.Refresh
InputStream1.Close
If I use Content Mode of Center, the imageview (flashCards) displays the canvas the correct size of the flashCards imageview dimensions. But, the image itself is cropped ... it's too big and doesn't show all of it.
If I use a Content Mode of Fill. the the imageview (flashCards) displays the canvas too short and wide. But, the image itself is all shown. Like it's compressed.
Any thoughts?
Thanks!