# 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 | integer | The ID of the bitmap containing the image. Must be a value obtained from one of the following functions: NewBitmapEx GetBitmapFromFile GetCtrlBitmap ClipboardGetBitmap GetCtrlDisplayBitmap GetPanelDisplayBitmap GetScaledPanelDisplayBitmap GetScaledCtrlDisplayBitmap DuplicateBitmap
| Note This function returns an error if the bitmap you specify has alpha-channel transparency data.

## Return Value

Name | Type | Description
status | integer | 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.