LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert an image string to image

The IMAQ Write JPEG String.vi simply creates a JPEG formatted byte stream in memory. (LabVIEW has the unfortunate feature that strings and byte arrays are still synonymous).

How you convert that into your target image (probably a .Net Image) is up to that target environment. The most trivial form is to simply dump that "string" to disk and then load it as a file. If you want to avoid the detour through the filesystem you need a streamable JPEG decoder. This is not a LabVIEW problem but better solved on a dedicated .Net or C# forum.

 

Something like this should work:

 

byte[] bitmap = GetYourImage();

Image image = Image.FromStream(new MemoryStream(bitmap));

 

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 11
(323 Views)