I want to draw image on the canvas, and my image is the result of image processing using imaq vision, but the result image is jpg file, and the CanvasDrawBitmap( ) function work only to the bmp file, so I have to save the jpg file to the bmp file first,and then read the bmp file to get the ID of the bmp file ,and then use the function CanvasDrawBitmap(),I think this is time consuming, is there any efficient method for the jpg file?
the following is part of my programs:
imaqCast (CanvasImage, image, IMAQ_IMAGE_RGB, NULL, 0);
imaqWriteBMPFile (CanvasImage, "CanvasImage.bmp",TRUE,NULL);
GetBitmapFromFile ("CanvasImage.bmp", &bitmapID2);
CanvasClear (imagePanel, IMAGE_CANVAS,VAL_ENTIRE_OBJECT);
CanvasDrawBitmap (imagePanel, IMAGE_CANVAS, bitmapID2,
MakeRect (0,0,240,320), MakeRect(0,0,240,320));
Dongsheng Zhao
North China Electronic Power Univ.
zds_hd@yahoo.com.cn