how do i do that?

Recommended Answers

All 4 Replies

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

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

how can you change the image format?

Welcome to daniweb larsquestion..

Please make your own thread. Don't rise dead thread.
You will get help from many members with new thread.

Thank you :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.