User`s guide
FUNCTIONS
SDK SECTION 11
Page 186
SaveAsBmp
unsigned int WINAPI SaveAsBmp(char* path, char* palette, long ymin, long ymax)
Description
This function saves the last acquisition as a bitmap file, which can be loaded into an
imaging package. The palette parameter specifies the location of a .PAL file, which
describes the colors to use in the bitmap. This file consists of 256 lines of ASCII text;
each line containing three numbers separated by spaces indicating the red, green and
blue component of the respective color value.
The ymin and ymax parameters indicate which data values will map to the first and last
colors in the palette:
• All data values below or equal to ymin will be colored with the first color.
• All values above or equal to ymax will be colored with the last color
• All other palette colors will be scaled across values between these limits.
Parameters
char* path: The filename of the bitmap.
char* palette: The filename of a palette file (.PAL) for applying color to the bitmap.
long ymin, long ymax: Range of data values that palette will be scaled across. If set to 0,
0 the palette will scale across the full range of values.
Return
unsigned int
DRV_SUCCESS
DRV_NOT_INITIALIZED
DRV_ACQUIRING
DRV_ERROR_ACK
DRV_P1INVALID
DRV_ERROR_PAGELOCK
Data successfully saved as bitmap.
System not initialized.
Acquisition in progress.
Unable to communicate with card.
Path invalid.
File too large to be generated in memory.
See also
SaveAsSif SaveAsEDF SaveAsFITS SaveAsRaw SaveAsSPC SaveAsTiff
NOTE: If the last acquisition was in Kinetic Series mode, each image will be saved in a separate
Bitmap file. The filename specified will have an index number appended to it, indicating the position
in the series.