Just to make sure we are talking about the same thing, what you expect to get is the grayscale picture on you post above, without the overlayed analysis of the image, right?
If so, as mentioned by others, it looks like each of those bytes you have in VB corresponds to the 8 bit grayscale value of each pixel of your image. The VB array has a total of 138450 elements which could correspond to a 355x390 image.
Something to consider when using the data you have: in the hexadecimal data you get in Xojo the last two bytes repeat for all elements in the array.
Also, a grayscale pixel of value PixelValue correponds to a RGB pixel of value RGB(PixelValue, PixelValue, PixelValue).
If the image you are expecting to get includes the overlayed analysis, forget about the grayscale.
I wish I can extract or convert this RawImage_param to a file. But I can access the element. Xojo told that its an object and not an array as shown here
Ronaldo, are you able to PM me the project so I can have a dig? I know what the problem is but I don’t know why GrFingerXLib is using Variants to store pointers to strings. They should really be using a the pointer returned from the unsigned char* rawImage
and where ever else it is mentioned throughout the project
then use the following code inside ImageAcquired_Event
[code]Dim pic As Picture = New Picture(width_Param, height_Param)
Dim surface As RGBSurface = pic.RGBSurface
Dim offset As Integer = 0
For y As Integer = 0 To height_Param - 1
For x As Integer = 0 To width_Param - 1
surface.Pixel(x, y) = rgb(rawImage_Param.Byte(offset), rawImage_Param.Byte(offset), rawImage_Param.Byte(offset))
offset = offset + 1
Next
Next
ImageWell1.Image = pic[/code]
I’m coding blind here, so you might need to fix some syntax issues.
Ah, ActiveX, other than hacking around the control to change the Variants to pointers I’ll try to use what you have, I don’t use variants so there might be a better way to convert the Variant Array of Objects to a usable format, but this should get you going, put this inside the ImageAcquired_Event:
[code]Dim o() As Object = rawImage_Param
Dim pic As New Picture(width_Param, height_Param)
Dim surface As RGBSurface = pic.RGBSurface
Dim offset As Integer = 0
Dim tmp As Integer
For y As Integer = 0 To height_Param - 1
For x As Integer = 0 To width_Param - 1
tmp = asc(str(o(offset))) //system.DebugLog(str(tmp))
surface.Pixel(x, y) = rgb(tmp, tmp, tmp)
offset = offset + 1
Next
Next
If anyone is interested in trying to get the data out via a quicker method, here’s a way to set up the rawImage_Param variable to contain data similar to how Ronaldo is finding it.
[code]Dim o() As Object
Dim v1 As Variant = “a”
Dim v2 As Variant = “b”
Dim v3 As Variant = “c”
o.append(v1)
o.append(v2)
o.append(v3)
Dim rawImage_Param As Variant = o
Break[/code]
Edit: Made the demo work on win or mac by not using COM