Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i used this code

C#
private void button2_Click(object sender, EventArgs e)
       {


           saveFileDialog1.InitialDirectory = "C:\\temp\\image.jpg";
           saveFileDialog1.Filter = "picture files (*.jpg)|*.jpg";
           saveFileDialog1.FilterIndex = 2;
           saveFileDialog1.RestoreDirectory = true;
           saveFileDialog1.ShowDialog();


       }


on a press of a button it opens a dialog box,but now i need a code which allows me to save the pic without the dialog box.....
Posted
Updated 4-Nov-11 21:25pm
v2
Comments
nagendrathecoder 5-Nov-11 2:58am    
Do you want to save image into database or what? your question is not too clear, please tell us more about it.

1 solution

Assuming your image is the following, just call the Save method on it:
C#
Image img;
img.Save("filename.jpg");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900