您的位置:首页 > 其它

Web GDI+显示图片

2008-08-22 11:05 225 查看
private void MarkupImage(string image, string desc)

{

Bitmap bitmap = new Bitmap(Server.MapPath(image));

bitmap = WindowsApplication1.Receipt.MarkupImage();

bitmap = new Bitmap(800, 600);

MemoryStream memStream = new MemoryStream();

Graphics g = Graphics.FromImage(bitmap);

g.FillRectangle(new SolidBrush(Color.White), 0, 0, bitmap.Width, bitmap.Height);

g.DrawString("aaaaaaaaaaaaaaaaaaaaaaaa", new Font("Arial", 9, FontStyle.Bold), new SolidBrush(Color.Green), new PointF(0, 0));

bitmap.Save(memStream, ImageFormat.Jpeg);

memStream.WriteTo(Response.OutputStream);

// Cleanup

g.Dispose();

bitmap.Dispose();

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: