ICImagingControl.MemorySaveImage Method

This method saves the current buffer as a .bmp file.
Syntax:
Public Sub MemorySaveImage(Filename As String)
Parameter Description
Filename

Specifies the filename of the image file to be saved.

Remarks:

The pixel format of the bitmap is determined by the ICImagingControl.MemoryCurrentGrabberColorformat property.

Sample:

This example opens a common dialog box for the user to select a filename and then saves an image under this name:

Sub SaveImageFile(ic As ICImagingControl, cmdlg As CommonDialog)
    On Error GoTo err_SaveImageFile

    ' Snap an image if live image is running. Else use existing image.
    If ic.LiveVideoRunning Then
        ic.MemorySnapImage
    End If

    ' Open a common dialog to let the user select a filename and
    ' save the image.
    With cmdlg
        .Filter = "Bitmap (*.bmp)|*.bmp|"
        .CancelError = True
        .ShowSave
        ic.MemorySaveImage .FileName
    End With
Exit Sub

err_SaveImageFile:
    If Err <> cdlCancel Then MsgBox Err.Description
End Sub
See also: ICImagingControl, ICImagingControl.MemorySnapImage, ICImagingControl.MemoryCurrentGrabberColorformat

<< ICImagingControl