No announcement yet.

Save a picture file from a picturebox (VB.NET)

  • Filter
  • Time
  • Show
Clear All
new posts

  • Save a picture file from a picturebox (VB.NET)

    I try create a plugin that read a QRCode !
    It run very well with a file read on my hard disk and i want to add the possibility to read a picture from a webcam !
    My webcam save well a frame into a picturebox but i can't to save my picture as a file !
    my picturebox's name is 'picImage' so i use the command:
    picImage.Image.Save("test.bmp", System.Drawing.Imaging.ImageFormat.Bmp)
    But my picture isn't saved !
    Where is my error please ?

    The error returned is:
    BCode Reader error: The reference of the object isn't defined as an object's instance .
    I suppose that i need to create an new object before my command save ?
    Last edited by pierrotm777; 01-08-2013, 04:57 AM.

  • #2
    Quick google search brought me to here:

    I love stackoverflow, very reliable... In regards to what was said there, are you drawing the image using the graphics class or setting the .Image of the picturebox? I know I've ran into the same problems in the past when drawing stuff with the graphics class.
    Current Worklog: TBA - '05 Rav4 (Mobo Dead). - Forums for Rav4 owners - Cooking website/forums
    -Basic forums live atm, come contribute!


    • #3
      Edit: Disregard. I only half-read the post because it's early and I'm not yet caffeinated.
      Last edited by ClockWorK; 01-08-2013, 11:31 AM.