ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW image data from hDIB

I have searched the DevZone and I have found the question asked several times, but no good answers.

Is there a way to get the bitmap data from a Device Independent Bitmap handle into LabVIEW? I am trying to get some image data through a DLL and I have got to the point of having an hDIB (handle to a device independent bitmap). I need to get this image into LabVIEW, but I am unsure how to continue. Any ideas or better yet, examples?

Thanks in advance for any help,
Bob
0 Kudos
Message 1 of 2
(4,229 Views)
Hello Bob,

Refer to the post linked below to get some ideas about reading data at a memory location into LabVIEW.
http://forums.ni.com/ni/board/message?board.id=170&message.id=64381&requireLogin=False

If you have NI Vision you could perhaps use the IMAQ MemPeek.vi to get the memory contents as a string in LabVIEW that can be parsed for the image data.

If this dll is something that you have created then a slightly different approach could be used. Again, using the NI Vision you can pass a pointer to an IMAQ image from LabVIEW to your dll, in the dll you can populate the memory location with the image data and use that information in LabVIEW. I have attached a screenshot that demonstrates this process. I hope this helps you out.

Regards,
Nipun M
0 Kudos
Message 2 of 2
(4,209 Views)