I seem to be stuck when it comes to retrieving the bitmap loaded into an ImageView. What is the correct method use? I just need to ascertain its Width and Height.
This method causes: NullPointer
B4X:
Dim iv as ImageView : iv.Initialize("")
iv.Bitmap=LoadBitmap(File.DirAssets,"someimage.png")
...
Dim bm As Bitmap : bm.Initialize3(iv.Bitmap)
This method causes:Object should first be initialized (Bitmap)
B4X:
Dim iv as ImageView : iv.Initialize("")
iv.Bitmap=LoadBitmap(File.DirAssets,"someimage.png")
...
Dim bm As Bitmap : bm=iv.Bitmap
Thanks Erel.
After much head-scratching, and commenting out lots of code, the trouble-maker turned out to be the following, which I had in a sub acting on the ImageView. Thus, the image was being removed(!)