Dave Chika

Dave Chika

  • NA
  • 70
  • 0

How can i Save captured images from webcam with different file names

Oct 25 2011 11:29 PM
Hello, with reference to this thread http://www.c-sharpcorner.com/Forums/Thread/142990/,

  How can i save images captured from webcam to my c:/ drive with different file names.
         i have been able to capture image webcam and save it on my c:/ drive, but am having slight problems. i want each time an image is saved,it should not overwrite the old captured one already saved on my c:/ (i.e images saved will be different from previous ones left untouched with different names e.g pix1.jpg,pix2.jpg,pixs3.jpg,pix4.jpg etc).

  this is the exact codes am using to capture image from webcam
https://sites.google.com/site/webcamlibrarydotnet/winfrom-and-csharp-sample-code-and-download

  i modifyied the SaveImageCapture code so that it saves directly to my c:/ drive without promting the use of   FileDialog box
 
 
      public static void SaveImageCapture(System.Drawing.Image image)
        {
    image.Save("c:\\image.gif", System.Drawing.Imaging.ImageFormat.Jpeg);
       }
   

Answers (7)