Admin Production ni-theme
Current Publication

SaveBitmapToFile

LabWindows/CVI

SaveBitmapToFile

int SaveBitmapToFile (const char path[], int bitmapID);

Purpose

Saves a bitmap to file.

Parameters

Input
Name Type Description
path const char[] The pathname of a file. If it is not an absolute pathname, the pathname is relative to the current working directory.
bitmapID int ID of the bitmap object that contains the image. You can obtain the ID from functions such as NewBitmap and GetCtrlBitmap.

Note   This function returns an error if the bitmap you specify has alpha-channel transparency data.

Return Value

Name Type Description
status int Returns 0 if the function succeeded or a negative error code if the function failed.

The possible negative error codes are:

–1 to –999 A User Interface Library error code. (Constants are available in userint.h.)

You can call the GetGeneralErrorString function in the toolbox.fp instrument driver to obtain a description of any of these error codes.

Additional Information

Library: Programmer's Toolbox

Include file: toolbox\toolbox.h

LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later

Example

Refer to apps\uirview\uirview.cws for an example of using the SaveBitmapToFile function.