Working with images with the help of System.Drawing.Image

You can work with several types of files in ASP.NET. Here is a list of most widely use .BMP, .JPG, and .TIF files. With the help of .NET we can create pictures, resize, and incorporate watermarks or text.

System.Drawing.Image class is an abstract class but you may instantiate variety of objects such asImage.FromFile, Image.FromStream. Two additional objects that are usefulSystem.Drawing.Bitmap for still images, andSystem.Drawing.Imaging.Metafile for dynamic images. Both of these objects inherit Syste.Drawing.Image class.

We can display images like that:
Image myImage = Image.FromFile(@"C:\windows\gone.bmp");
pictureBox1.BackgroundImage = myImage;

OR

Bitmap myBitmap = new Bitmap(@"C:\windows\gone.bmp");
pictureBox1.BackgroundImage = myBitmap;

You can also Create Pictures and saving them at the same time using Bitmap
Bitmap mybm = new Bitmap(300, 300);//Create new
//or
Bitmap mybm = new Bitmap(@"C:\WINDOWS\Azul.jpg");//update
------------------------------------------------------
Graphics myGraphics = Graphics.FromImage(mybm);
Brush myBrash = new LinearGradientBrush(new Point(1, 1), new Point(600, 600),Color.White, Color.Red);
Point[] points = new Point[]
    {new Point(10, 10),
     new Point(77, 500),
     new Point(590, 100),
     new Point(250, 590),
     new Point(300, 410)};
myGraphics.FillPolygon(myBrash, points);
mybm.Save("mybm.jpg", ImageFormat.Jpeg);

There are wide selections of predefined icons you can use within your project. For instance, questions, exclamations, etc… they are all with the predefined size of 40X40. Changing icons is easy, all you need is to use contractors built in the icons.
Graphics myGraphics = this.CreateGraphics();
myGraphics.DrawIcon(SystemIcons.Question, 40, 40);

NOTE: if you want to store image use JPG and if you want to store charts use GIF.