Hello
Creating simple bitmap for my captcha.
Need more complex pictures.
How can i do this?
Response.Clear();
int height = 50;
int width = 130;
Bitmap bmp = new Bitmap(width, height);
RectangleF rectf = new RectangleF(10, 5, 0, 0);
Graphics g = Graphics.FromImage(bmp);
g.Clear(Color.White);
g.SmoothingMode = SmoothingMode.AntiAlias;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.DrawString(Session["captcha"].ToString(), new Font("Thaoma", 18, FontStyle.Italic), Brushes.Green, rectf);
//g.DrawRectangle(new Pen(Color.Red), 1, 1, width - 2, height - 2);
g.Flush();
Response.ContentType = "image/jpeg";
bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
g.Dispose();
bmp.Dispose();
< ...
Go to the complete details ...