IC Imaging Control .NET

ICImagingControl.MemorySaveImage Method

ICImagingControl.MemorySaveImage Method

This method saves the current buffer as a .png file.
Public Sub MemorySaveImage(Filename As String)
public void MemorySaveImage(string Filename);
Parameter Description

Specifies the filename of the image file to be saved.


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


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

Try ' Snap an image, if live image is running. Else use the existing image. If IcImagingControl1.LiveVideoRunning Then IcImagingControl1.MemorySnapImage() End If ' Open a common dialog to let the user select a filename and ' save the image. Dim dialog As New System.Windows.Forms.SaveFileDialog dialog.Filter = "Bitmap (*.png)|*.png" If dialog.ShowDialog() = DialogResult.OK Then IcImagingControl1.MemorySaveImage(dialog.FileName) End If Catch ex As System.Exception MsgBox(Err.Description) End Try
try { // Snap an image, if live video is running. Else use the existing image. if (ICImagingControl1.LiveVideoRunning) { ICImagingControl1.MemorySnapImage(); } // Open a common dialog to enable the user to select a filename and save the image. System.Windows.Forms.SaveFileDialog dialog = new System.Windows.Forms.SaveFileDialog(); dialog.Filter = "Bitmap (*.png)|*.png"; if (dialog.ShowDialog() == DialogResult.OK) { ICImagingControl1.MemorySaveImage(dialog.FileName); } } catch (Exception ex) { MessageBox.Show(ex.Message); }
See also: ICImagingControl, ICImagingControl.MemorySnapImage, ICImagingControl.MemoryCurrentGrabberColorformat

<< ICImagingControl

Get in touch with us

About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us