Saving Pictures

Discussion in 'Programming & Scripting' started by mojobojo, Jan 23, 2009 with 13 replies and 276 views.

  1. mojobojo

    mojobojo Enthusiast

    Messages:
    694
    Ratings:
    96
    I need help saving pictures from a picturebox. Ive looked all over google, im so confused with they'r explinations. Can someone help me please?

     
  2. GoldBl4d3

    GoldBl4d3 Retired Retired

    Messages:
    3,758
    Ratings:
    1,328
    try:

    Code:
    [SIZE=2]
    pictureBox1.Image.Save([/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]@"C:Image File.jpg"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
    [/SIZE]
     
    • Like Like x 1
  3. OP
    mojobojo

    mojobojo Enthusiast

    Messages:
    694
    Ratings:
    96
    I cant belive it was that easy. Thank you, I was making it harder that it was.
     
  4. GoldBl4d3

    GoldBl4d3 Retired Retired

    Messages:
    3,758
    Ratings:
    1,328
    lol! yeah just try different things:thumbup:
     
  5. OP
    mojobojo

    mojobojo Enthusiast

    Messages:
    694
    Ratings:
    96
    My first attempt was

    Code:
    picturebox1.Save("C:\image.jpg");
    so I was close.
     
  6. GoldBl4d3

    GoldBl4d3 Retired Retired

    Messages:
    3,758
    Ratings:
    1,328
    yeah

    you need to remember that you need to talk about the right property. Because your not going to save pictureBox1 aka a control. your going to save pictureBox1s image
     
  7. Noobish

    Noobish Newbie

    Messages:
    40
    Ratings:
    0
    could you also do that with a savedialog ??
     
  8. OP
    mojobojo

    mojobojo Enthusiast

    Messages:
    694
    Ratings:
    96
    :huh:
    Yeah just do

    Code:
    [SIZE=2]
    pictureBox.Image.Save("Name of your save file dialouge".FileName);[/SIZE]
     
    • Like Like x 1
  9. Noobish

    Noobish Newbie

    Messages:
    40
    Ratings:
    0

    Thanks :biggrin:
     
  10. superaison

    superaison Banned

    Messages:
    1,404
    Ratings:
    269


    Wierd..

    I just loaded mine into a byte[] and wrote it as a new file, however, i wasn't writing a image, was writing it into a certian location of a file, however, that does make it easier to write some things that I do.

    If you want to make fun of me for my ways, just ask what the program was, then I can make fun of you :smile:
     
  11. OP
    mojobojo

    mojobojo Enthusiast

    Messages:
    694
    Ratings:
    96
    I wont make fun of you at all. Whatever works to get the job done!
     
    • Like Like x 1
  12. dschu012

    dschu012 Member

    Messages:
    760
    Ratings:
    381
    I bet it was for changing the image when resigning CON files. That is the only thing I can think of. Am I right?
     
  13. GoldBl4d3

    GoldBl4d3 Retired Retired

    Messages:
    3,758
    Ratings:
    1,328
    yeah but he just wanted to save a plain image. not an image within a file
     
  14. superaison

    superaison Banned

    Messages:
    1,404
    Ratings:
    269
    I will admit, I didnt know about Image.Save .... I was loading the **** into a byte[] as I read it from the ****. Then writing the byte[] to a new file lol.


    Sad :tongue: