Hi,
I'm having trouble with loading a created bitmap in an imageview (see screenshot).
When I load a bitmap I created in B4A the size is wrong (top imageview). However, when I send it through a dummy function where I create a new bitmap with exectly the same dimensions, it works correctly (bottom imageview).
Here is the dummy function (an example project is added as an attachement)
I would like to avoid doing this because I have to load a lot of bitmaps in my app.
I'm having trouble with loading a created bitmap in an imageview (see screenshot).
When I load a bitmap I created in B4A the size is wrong (top imageview). However, when I send it through a dummy function where I create a new bitmap with exectly the same dimensions, it works correctly (bottom imageview).
Here is the dummy function (an example project is added as an attachement)
B4X:
Sub Dummy(b As Bitmap) As Bitmap
Dim c As Canvas
Dim b2 As Bitmap
b2.InitializeMutable(b.Width, b.Height)
c.Initialize2(b2)
Dim D As Rect
D.Initialize(0,0,b2.Width, b2.Height)
c.DrawBitmap(b, Null, D)
Return b2
End Sub
I would like to avoid doing this because I have to load a lot of bitmaps in my app.