LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

save canvas data as bitmap

Is there a way to save the data displayed on the canvas (in CVI LabWindows) to a file in bmp or jpg format ?
0 Kudos
Message 1 of 2
(3,719 Views)

Like any other control, canvas aspect can be saved at any moment to a bitmap which can lately saved to file; don't forget to dispose of the bitmap after using it.

 

Here's an example of how to do it:

 

    int        bitmap = 0;

    GetCtrlDisplayBitmap (panel, PANEL_CANVAS, 0, &bitmap);
    SaveBitmapToPNGFile (bitmap, "c:\\canvas.png");
    DiscardBitmap (bitmap);
 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 2
(3,713 Views)