5
Contributors
4
Replies
32
Views
12 Years
Discussion Span
Last Post by Jx_Man
0

Hi,
It's pretty simple:
PictureBox1.Image.Save("FileName",Image Format)

E.G.:
PictureBox1.Image.Save("C:\NewFileName.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)

MaxDev

0

I've Written the following code to display ellipse in the picture box.
Dim g As Graphics
PictureBox1.Refresh()
g = PictureBox1.CreateGraphics()
g.DrawEllipse(Pens.Aqua, 10, 10, 100, 100)

When I was trying to retrieve the Image It is becoming null.


Dim pic As Image
pic = PictureBox1.Image
If SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
' pic.Save(SaveFileDialog1.FileName)
PictureBox1.Image.SaveSaveFileDialog1.FileName, Imaging.ImageFormat.Jpeg) End If

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.