How do you save a png file in C# sharp?

John123

New member
Every time I run this code, I always get an " ArgumentException was unhandled" for the bitmap parameter.

Bitmap myBitmap = new Bitmap("umbrella.jpg");
Graphics myGraphics = Graphics.FromImage(myBitmap);
myGraphics.Clear(Color.Red);

myBitmap.Save("image.png", ImageFormat.Png);
does anyone know whats wrong or where I can get a tutorial?
 
Back
Top