| Home > Function descriptions > | History back Previous chapter Next chapter Print |
SaveImageEx |
|
uEye ActiveX Manual Version 4.00
Syntax
LONG SaveImageEx (BSTR strFileName, LONG fileFormat, LONG Param)
Description
SaveImageEx() saves an image in (*.BMP) or Jpeg (*.JPG) format to a file. The images are read out from the current image memory. The bitmap is stored with the color depth that was used when allocating the image memory (in DIB mode) or that was set for the current color mode (in Direct3D mode).
The file name can contain an absolute as well as a relative file path.
Parameters
strFileName |
NULL: A file save dialog box will appear. other: Specifies the path and file name. |
fileFormat |
Defines the output format of the image: 0 = BMP format 1 = JPG format |
Param |
When you use JPG as file format, you can set the quality by specifying a value between 1 and 100 for Param. If Param=0, the system uses the default quality (75). If you use the BMP format, Param does not take effect. |
Return values
IS_SUCCESS |
Function executed successfully |
IS_NO_SUCCESS |
General error message |
Example:
//Save an image “image.bmp” in JPG format with high quality to C:\temp:
ret = SaveImageEx(“c:\\temp\\image.bmp”, 1, 95);
Related functions