ASPX.CS C# - How to generate dinamically a image
protected void Page_Load(object sender, EventArgs e)
{
protected void Page_Load(object sender, EventArgs e)
{
// create a Graphics object
Bitmap bmp = new Bitmap(745, 570);
Graphics g = Graphics.FromImage(bmp);
Bitmap bmp = new Bitmap(745, 570);
Graphics g = Graphics.FromImage(bmp);
// now draw on the Graphics object
SolidBrush b = new SolidBrush(Color.FromArgb(191, 191, 191));
g.FillRectangle(b, new Rectangle(0, 0, bmp.Width, bmp.Height));
SolidBrush b = new SolidBrush(Color.FromArgb(191, 191, 191));
g.FillRectangle(b, new Rectangle(0, 0, bmp.Width, bmp.Height));
// send the image as response
bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
}
{moscomment}
| < Prev | Next > |
|---|





