I am sure I am missing something basic, but can't figure it out: I want to get the color of a pixel from an imageview (called "iv") bitmap:
B4X:
iv.Bitmap = LoadBitmap(File.DirAssets, "t.gif")
dim c as int
c = iv.Bitmap.GetPixel(2,3)
But I am told GetPixel was not amongst the Bitmap members. When I look up "Bitmap", the documentation tells me that GetPixel is a member of a Bitmap object.
I am sure I am missing something basic, but can't figure it out: I want to get the color of a pixel from an imageview (called "iv") bitmap:
B4X:
iv.Bitmap = LoadBitmap(File.DirAssets, "t.gif")
dim c as int
c = iv.Bitmap.GetPixel(2,3)
But I am told GetPixel was not amongst the Bitmap members. When I look up "Bitmap", the documentation tells me that GetPixel is a member of a Bitmap object.
It does work, yes, thank you. Do you know why I can't access the Bitmap in the imageview directly? It is a bitmap, right? So I think it should expose its members.
This is a small bug. ImageView.Bitmap returns the native bitmap and not the wrapped bitmap. You can see in the help popup that it returns android.graphic.Bitmap instead of Bitmap.
This is a small bug. ImageView.Bitmap returns the native bitmap and not the wrapped bitmap. You can see in the help popup that it returns android.graphic.Bitmap instead of Bitmap.