Android Question Is there a method like Picturebox.point(x,y) in VB6

Mscal

Member
Licensed User
Hi,everyone.At first I'm sorry for my stupid,but can you tell me if there a method used like Picturebox.point(x,y) in VB6?
For example
I have a EX.jpg,i want to load it in imageview or other something,then i can check every point's color.
How can i do it?
 

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
B4X:
Dim b As Bitmap
b.Initialize(File.DirAssets,"image.jpg")
      
'Get Pixel
pixel=b.GetPixel(x,y)
  
'Use canvas to draw point.
Dim c As Canvas
c.Initialize(imageview1)
  
c.DrawPoint(x,y,color)
 
Upvote 0

Mscal

Member
Licensed User
B4X:
Dim b As Bitmap
b.Initialize(File.DirAssets,"image.jpg")
     
'Get Pixel
pixel=b.GetPixel(x,y)
 
'Use canvas to draw point.
Dim c As Canvas
c.Initialize(imageview1)
 
c.DrawPoint(x,y,color)
I tested it and get color,but the value is minus.How can i convert it to RGB ?
 
Upvote 0

Mscal

Member
Licensed User
B4X:
Dim b As Bitmap
b.Initialize(File.DirAssets,"image.jpg")
     
'Get Pixel
pixel=b.GetPixel(x,y)
 
'Use canvas to draw point.
Dim c As Canvas
c.Initialize(imageview1)
 
c.DrawPoint(x,y,color)
well,I get pure White=-1 and pure black=-16777216.I think i can get the VB6 like value when add 16777216
 
Upvote 0
Top