public Bitmap Draw() { Bitmap obj_Bitmap = new Bitmap(500, 500); obj_Graphics = Graphics.FromImage(obj_Bitmap); obj_Graphics.Clear(Color.Wheat); obj_Graphics.SmoothingMode = SmoothingMode.HighQuality; obj_Graphics.DrawString("Line Chart", new Font("Arial", 10, FontStyle.Bold), new SolidBrush(Color.Purple), new Point(30, 30)); System.Web.HttpContext.Current.Response.ContentType = "image/jpeg"; obj_Bitmap.Save(System.Web.HttpContext.Current.Response.OutputStream, ImageFormat.Jpeg); obj_Bitmap.Dispose(); obj_Graphics.Dispose(); System.Web.HttpContext.Current.Response.End(); return obj_Bitmap; } Bitmap bmp = new Bitmap(500, 500); bmp=draw();
Bitmap b; ... // load bitmap ... Image i = (Image)b;
Bitmap objBitmap = new Bitmap("myfile.jpg"); Image objImage = (Image)objBitmap;
Bitmap bm = new Bitmap("someImage.jpg"); Image img = (Image)bm;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)