コード例 #1
0
        private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
        {
            GrCaptureImageFormat imformat = new GrCaptureImageFormat();

            switch (saveFileDialog1.FilterIndex)
            {
            case 1: { imformat = GrCaptureImageFormat.GRCAP_IMAGE_FORMAT_BMP; } break;
            }
            try
            {
                fingerPrint.SaveRawImageToFile(rawImage, saveFileDialog1.FileName, imformat);
            }
            catch { }
        }
コード例 #2
0
 public void SaveRawImageToFile(FingerprintRawImage rawImage, string fileName, GrCaptureImageFormat imageFormat)
 {
     try
     {
         IntPtr destination = Marshal.AllocCoTaskMem(rawImage.Width * rawImage.Height);
         Marshal.Copy(rawImage.RawImage, 0, destination, rawImage.Width * rawImage.Height);
         this.SaveRawImageToFile(destination, rawImage.Width, rawImage.Height, fileName, imageFormat);
         Marshal.FreeCoTaskMem(destination);
     }
     catch (OutOfMemoryException exception)
     {
         FingerprintException exception2 = new FingerprintException(-7, exception);
         throw exception2;
     }
 }
コード例 #3
0
        private void SaveRawImageToFile(IntPtr rawimage, int width, int height, string fileName, GrCaptureImageFormat imageFormat)
        {
            int errorCode = 0;

            try
            {
                errorCode = GrFingerprintProxy.GrCapSaveRawImageToFile(rawimage, width, height, fileName, imageFormat);
            }
            catch (AccessViolationException exception)
            {
                FingerprintException exception2 = new FingerprintException(-7, exception);
                throw exception2;
            }
            FingerprintException.CheckError(errorCode);
        }
コード例 #4
0
ファイル: frmMain.cs プロジェクト: edarkzero/Fingerprint
 private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
 {
     GrCaptureImageFormat imformat = new GrCaptureImageFormat();
     switch(saveFileDialog1.FilterIndex)
     {
         case 1:{imformat = GrCaptureImageFormat.GRCAP_IMAGE_FORMAT_BMP; }break;
     }
     try
     {
         fingerPrint.SaveRawImageToFile(rawImage, saveFileDialog1.FileName, imformat);
     }
     catch { }
 }
コード例 #5
0
 public static extern int GrCapSaveRawImageToFile([In] IntPtr rawimage, int width, int height, string fileName, GrCaptureImageFormat imageFormat);
コード例 #6
0
 private void SaveRawImageToFile(IntPtr rawimage, int width, int height, string fileName, GrCaptureImageFormat imageFormat)
 {
     int errorCode = 0;
     try
     {
         errorCode = GrFingerprintProxy.GrCapSaveRawImageToFile(rawimage, width, height, fileName, imageFormat);
     }
     catch (AccessViolationException exception)
     {
         FingerprintException exception2 = new FingerprintException(-7, exception);
         throw exception2;
     }
     FingerprintException.CheckError(errorCode);
 }
コード例 #7
0
 public void SaveRawImageToFile(FingerprintRawImage rawImage, string fileName, GrCaptureImageFormat imageFormat)
 {
     try
     {
         IntPtr destination = Marshal.AllocCoTaskMem(rawImage.Width * rawImage.Height);
         Marshal.Copy(rawImage.RawImage, 0, destination, rawImage.Width * rawImage.Height);
         this.SaveRawImageToFile(destination, rawImage.Width, rawImage.Height, fileName, imageFormat);
         Marshal.FreeCoTaskMem(destination);
     }
     catch (OutOfMemoryException exception)
     {
         FingerprintException exception2 = new FingerprintException(-7, exception);
         throw exception2;
     }
 }
コード例 #8
0
 public static extern int GrCapSaveRawImageToFile([In] IntPtr rawimage, int width, int height, string fileName, GrCaptureImageFormat imageFormat);