This example will capture a sequence of 25 images to memory, and then save
the images to 25 individual files. A "*" character is added to the filename
to enable Imaging Control to insert a frame number:
Sub SaveImageSequence(ic As ICImagingControl, cmdlg As CommonDialog)
On Error GoTo err_SaveImageSequence
Const NumberOfImages = 25
ic.ImageRingBufferSize = NumberOfImages
ic.MemorySnapImageSequence NumberOfImages
With cmdlg
.Filter = "Bitmap (*.bmp)|*.bmp|"
.CancelError = True
.ShowSave
ic.MemorySaveImageSequence NumberOfImages, _
Left$(.FileName, Len(.FileName) - 4) & _
"*" & _
Right$(.FileName, 4)
End With
Exit Sub
err_SaveImageSequence:
If Err <> cdlCancel Then MsgBox Err.Description
End Sub
|