View Full Version : DMK51AG02 MemoryGetImagedata --->Empty

March 21, 2013, 13:37:55
Hello all,

i have the camera type above. Although i take and save picture with livestart i dont get any
data from the function MemoryGetImagedata for any further calculations also from the property Picture.

my sample code is :

If ICImagingControl.DeviceValid Then
If ICImagingControl.LiveVideoRunning = False Then
End If
End If
Set ICImagingControl = Nothing

If ICImagingControl.DeviceValid Then
If ICImagingControl.LiveVideoRunning Then
End If
End If
If ICImagingControl.DeviceValid Then

ICImagingControl.MemorySaveImageJpeg TargetFile, 90

Picture1.Picture = ICImagingControl.Picture
BildArray() =ICImagingControl.MemoryGetImageData

thanks in advanced..

Stefan Geissler
March 21, 2013, 13:58:15

what is saved in the Target file? Does it contain something useful?

March 21, 2013, 14:02:23

in Targetfile i have the picture from Memorysnapimage,which is the desired picture.

Stefan Geissler
March 21, 2013, 17:16:08
Sorry, I misunderstood your case... VB6 is a little bit outdated, therefore I do not have all of this in my mind.

If you want to access the image data as array, then this works as follows:

Dim ImageData As Variant
Dim x As Integer, y As Integer
ImageData = ICImagingControl1.MemoryGetImageData
For y = 0 To ICImagingControl1.ImageHeight - 1
For x = 0 To ICImagingControl1.ImageWidth - 1
ImageData(x, y) = 255 - ImageData(x, y)
Next x
Next y
ICImagingControl1.MemoryReleaseImageData ImageData

Your "BildArray" is an unknown type for me. However, MemoryGetImageData return a variant. The code above is from the documentation:

March 22, 2013, 14:58:41
;-) Thank you very much!!!
i have defined Bildarray as Byte ...When i change it to variant i get error in this line..
However with this example i can make a start.