11-25-2008 05:41 AM
i want to display a variable of the type bitmap in the cwimaqviewer from the vision library, how can this be done?
a workaround is to copy the image variable into the clipboard but this is not really proffessional
can anybode help me?
Solved! Go to Solution.
11-25-2008 06:56 AM
Hi there,
One possibility is to save your image in the hard disc.
Use cwimaqvision1.ReadImage(cwimaqviewer1.Image, yourPath, cwimaqviewer1.Palette) to load the image from the hard disc.
hope this could help.
11-25-2008 07:21 AM
11-25-2008 07:31 AM
hi,
You can also create a new CWIMAQImage. Use ReadImage function to load your image to CWIMAQImage. Then you can attach the image whenever you want. Pay attention that, the type of CWIMAQImage is U8 by default when a new one is created.
Is this what u want?
11-25-2008 07:55 AM
11-25-2008 08:06 AM
hi,
Here is a example.
NationalInstruments.CWIMAQControls.CWIMAQImage IMAG_Source = new NationalInstruments.CWIMAQControls.CWIMAQImage();
IMAG_Source.Type = NationalInstruments.CWIMAQControls.CWIMAQImageTypes.cwimaqImageTypeRGB32; //depends on the source image.
CWIMAQVision1.ReadImage(IMAG_Source, "@c:\image.bmp", CWIMAQViewer1.Palette);
IMAG_Source is what you want.