Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

displaying a color image

i am using the CCWIMAQViewer to display a .tiff image on a dialog application. I can display the image, but it is black and white. does anyone know how to display it in color?
0 Kudos
Message 1 of 2
(3,138 Views)
use the CCWIMAQVision class to create the image, then set the type to RGB, read the image file, and then attach the image object to the image viewer control.

image=m_CWIMAQVisionObj.CreateCWIMAQImage();

image.SetType(IMAQ_IMAGE_RGB);

m_CWIMAQVision1.ReadFile(image, m_strPath + "\\myimage.tif", COleVariant((long)32), vOptional);

m_CWIMAQViewerObj.Attach(image);
0 Kudos
Message 2 of 2
(3,138 Views)