在asp.net中输出bitmap对象

时间:2016-02-28 00:48:46   收藏:0   阅读:456
Bitmap bmp = new Bitmap(100, 100);
        Graphics g = Graphics.FromImage(bmp);
        g.Clear(Color.White);

        g.DrawString("abc", new Font("宋体", 12), new SolidBrush(Color.Red), 0, 0);

        System.IO.MemoryStream ms = new System.IO.MemoryStream();
        bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
        Response.BinaryWrite(ms.GetBuffer());

 

原文:http://www.cnblogs.com/bigfish291202/p/5223895.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!