LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save a canvas into bitmap !

Hi all,

I am using CVI8.0 and currently there is one problem I am stuck with... It is that I have one canvas and I want to save it into JPG or BMP with the good resolution....Anyone kind can help me on this ?
And in case i need to print the screen, is there any function or way to do it?
Waiting for your help, friends 🙂
0 Kudos
Message 1 of 2
(3,066 Views)

Hello,

First, get a handle to the canvas bitmap by using the GetCtrlBitmap function:

 

int bitmap;

GetCtrlBitmap (pnlHandle, PNL_CANVAS, 0, &bitmap);

 

Then, you can use SaveBitmapToBMPFile, or SaveBitmapToJPEGFile to save the bitmap to a file. Don't forget to discard the bitmap afterwards (DiscardBitmap).

0 Kudos
Message 2 of 2
(3,063 Views)