Please enable JavaScript to view this site.

uEye .NET Manual 4.97

Class

uEye.Image

Accessible

Camera.Image.Save

Syntax

uEye.Image.Save(string strFilename)

uEye.Image.Save(string strFilename, int s32MemID)

uEye.Image.Save(string strFilename, int s32MemID, uEye.Defines.ImageFormat format)

uEye.Image.Save(string strFilename, int s32MemID, uEye.Defines.ImageFormat format, int s32Quality)

uEye.Image.Save(string strFilename, uEye.Defines.ImageFormat format)

uEye.Image.Save(string strFilename, uEye.Defines.ImageFormat format, int s32Quality)

Description

Save an image to a file. The image must be BMP, JPEG or PNG format. The image is read-out from the active image memory or the specified image memory.

hint_info

When saving an image Freeze() should not be called before with uEye.Defines.DeviceParameter.DontWait, because the image acquisition might not be completed.

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). You can save images with a bit depth of more than 8 bit in the PNG format. 12 bit formats are converted into 16 bit. JPEG files are always saved with a color depth of 8 or 24 bits.

hint_info

In Direct3D mode, overlay data is not saved.

Parameter

strFilename

Name of the file to be saved (Unicode).

If NULL is passed, the "Save as" dialog opens.

format

File format to be saved:

uEye.Defines.ImageFormat.Bmp

uEye.Defines.ImageFormat.Jpeg

uEye.Defines.ImageFormat.Png

uEye.Defines.ImageFormat.Raw

uEye.Defines.ImageFormat.Tiff

s32MemID

Image memory ID

s32Quality

Sets the image quality for JPEG and PNG (and therefore the compression). The higher the value, the better the quality is:

100 = maximum quality, that means no compression

If the parameter is set to 0, the default value of 75 is used.

For BMP the parameter is ignored.