locked
How to capture a image from web cam and display in picture box??

    Question

  • in my windows form , i have a picture box in that picture box i want to insert a image that i am capturing with my webcam...
    and after that i want to save that image in database.

    Sharad Sharma Pursuit Technologies Bangalore
    Tuesday, June 30, 2009 9:24 AM

Answers

  • You will most likely need to find an API for your webcam that allows you to capture the images.
    Or buy one that does have an available programmers API. 
    Don't forget to look into licensing if you plan to distribute an application.
    Mark the best replies as answers. "Fooling computers since 1971."
    • Marked as answer by Harry Zhu Tuesday, July 07, 2009 3:13 AM
    Tuesday, June 30, 2009 6:43 PM
    Moderator
  • if you want to capture image from webcam in .net, you have to use Windows Image Acquisition (WIA). There is an article in the link below that explain how to do it with WIA.
    http://www.codeproject.com/KB/dotnet/wiascriptingdotnet.aspx
     // C#
    http://www.vbforums.com/showthread.php?t=378126 //VB.NET, this code it easy to convert to C#

    Also, when you get your image in pictureBox, use save method from picturebox.image

    PictureBox1.Image.Save(Filename, imaging.ImageFormat.Jpeg)

    kaymaf



    I hope this helps, if that is what you want, just mark it as answer so that we can move on
    • Marked as answer by Harry Zhu Tuesday, July 07, 2009 3:13 AM
    Wednesday, July 01, 2009 4:03 AM

All replies

  • You will most likely need to find an API for your webcam that allows you to capture the images.
    Or buy one that does have an available programmers API. 
    Don't forget to look into licensing if you plan to distribute an application.
    Mark the best replies as answers. "Fooling computers since 1971."
    • Marked as answer by Harry Zhu Tuesday, July 07, 2009 3:13 AM
    Tuesday, June 30, 2009 6:43 PM
    Moderator
  • if you want to capture image from webcam in .net, you have to use Windows Image Acquisition (WIA). There is an article in the link below that explain how to do it with WIA.
    http://www.codeproject.com/KB/dotnet/wiascriptingdotnet.aspx
     // C#
    http://www.vbforums.com/showthread.php?t=378126 //VB.NET, this code it easy to convert to C#

    Also, when you get your image in pictureBox, use save method from picturebox.image

    PictureBox1.Image.Save(Filename, imaging.ImageFormat.Jpeg)

    kaymaf



    I hope this helps, if that is what you want, just mark it as answer so that we can move on
    • Marked as answer by Harry Zhu Tuesday, July 07, 2009 3:13 AM
    Wednesday, July 01, 2009 4:03 AM
  • Thanks all for the reply (=
    Wednesday, July 08, 2009 1:24 AM