PageWithImage.aspx.cs :
public class PageWithImage : Page
{
private void Page_Load(object sender, EventArgs e)
{
using(Bitmap bmp = new Bitmap( blankW, blankH ))
using(Graphics g = Graphics.FromImage( bmp ))
{
g.FillRectangle( ... );
g.DrawString( ... );
g.DrawLine( ... );
Response.ContentType = "image/gif";
bmp.Save( Response.OutputStream, ImageFormat.Gif );
}
}
...
}
LandVP LLC
No comments:
Post a Comment