Skip to content

Save image(in picture box) in to a file

Kavi suja

Kavi suja

Asked May 6, 2013, 3:23 AM EDT2 answers
Share
LinkedInX
Hi,
   I done code for free hand drawing in ASP.Net C#(Windows App).I have to store that image in DB when I clicking that button. But i don't have idea about it.Help me guys... I draw th image in picture box. The code for save button is following:

Code
ImageFormat format = ImageFormat.Jpeg;
            SaveFileDialog sfd = new SaveFileDialog();
            sfd.Filter = "Jpeg Format(*.Jpeg)|*.Jpeg";

            if (sfd.ShowDialog() == DialogResult.OK)
            {
                 //shapePB.Image.Save(sfd.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
                 shapePB.Image.Save(sfd.FileName, format);

            }
Here shapePB is a pictureBox.

Thanks in Advance

Kavisuja.M

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Kavi suja
    0
    Hi, Thank you for ur reply.But this webpage is not available.
    0