Home > Function descriptions > History back  Previous chapter  Next chapter  Print  

SaveImage

uEye ActiveX Manual Version 4.00

SaveImage

Syntax

LONG SaveImage (BSTR strFileName)

Description

SaveImage() saves an image from the active image memory (as returned by GetImageMem()) to a file. The file is saved in Windows bitmap format (BMP) with a color depth of 8, 15, 16, 24 or 32 bit depending on the color mode. Some image processing programs do not support 15 bit, 16 bit and 32 bit bitmaps and therefore may be unable to load these images.

The file name can contain an absolute as well as a relative file path.

Parameters

strFileName

NULL: A file save dialog box will appear.

not NULL: Specifies the path and file name.

Return values

IS_SUCCESS

Function executed successfully

IS_NO_SUCCESS

General error message

Example

//Save an image named “image.bmp” to the current directory:
ret = SaveImage(“image.bmp”);
//Save an image named “image.bmp” to C:\temp:
ret = SaveImage(“c:\\temp\\image.bmp”);
//Save an image and browse for the file name:
ret = SaveImage(NULL);

Example for C#

//Save an image named “testimage.bmp” to the current directory:
string strMyFile = "testimage.bmp";
byte[] byteMyFile;
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
byteMyFile = enc.GetBytes(strMyFile);
m_uEye.SaveImage(byteMyFile);

Related functions

SaveImageEx()


Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!

For technical questions please contact you local distributor or use the support form on our website.


© 2012 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com