One way you could to this would be to save the image in some known format (I used bitmap) to a file. Then you could read back the file in the form of a byte array. This would give you the image byte stream that you can send over the network (tcp or datasocket, it should'nt matter, datasocket was easier). Once your .NET app receives the data, you can cast it into a byte array and display the image like so
private void dataSocket1_DataUpdated(object sender, NationalInstruments.Net.DataUpdatedEventArgs e)
{
object data= e.Data.Value;
if(DataConverter.CanConvert(data,typeof(byte[])))
{
byte [] bytearray;
bytearray = (byte[])DataConverter.Convert(data,typeof(byte[]));
if(bytearray.Length > 1)
{
pictureBox1.Image = new Bitmap(new MemoryStream(bytearray));
}
}
}
Dataconverter is a Measurement Studio class that makes the casting process easier. I could'nt figure out how to convert the LV image data to a bitmap in memory, otherwise you would'nt need to save the file. One possible route would be to see how the Write Bitmap File.vi does it and use that to build a byte array that you could pass to datasocket.
Hope this helps. The example uses LV 7.1 and MStudio 7.1
Bilal Durrani
NI