Response.Clear(); int height =500; int width = 500; Random r = new Random(); int x = r.Next(500); Bitmap bmp = new Bitmap(width, height, PixelFormat.Format32bppPArgb); Graphics g = Graphics.FromImage(bmp); g.SmoothingMode = SmoothingMode.AntiAlias; //g.TextRenderingHint = TextRenderingHint.AntiAlias; g.Clear(Color.Green); System.Threading.Thread.Sleep(5000); System.Drawing.Pen p = new System.Drawing.Pen(System.Drawing.Color.Red); System.Drawing.Pen p1 = new System.Drawing.Pen(System.Drawing.Color.Blue); System.Drawing.Brush background=new System.Drawing.SolidBrush(System.Drawing.Color.Violet); System.Drawing.Brush background1 = new System.Drawing.SolidBrush(System.Drawing.Color.Red); //g.FillEllipse(background, 0, 0, 100, 100); //g.FillPie(background, 100, 100, 100, 100, 0, 90); // g.FillRectangle(background, 0, 100, 200, 50); // g.DrawRectangle(p1, 0, 0, 300, 300); g.DrawString("maneesh", new Font("Arial", 12, FontStyle.Italic), background1, new PointF(100, 50)); // g.DrawBezier(p,new PointF(0, 0),new PointF(10, 70),new PointF(100, 100),new PointF(200, 250)); // bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); // bmp.Save(Response.OutputStream, ImageFormat.Jpeg); g.Dispose(); bmp.Dispose(); Response.End();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)