GDI生成图片
来源:互联网 发布:可可网络验证破解教程 编辑:程序博客网 时间:2024/06/05 16:22
//引入命名空间
//using System.Drawing;
//using System.Drawing.Drawing2D;
//using System.Drawing.Imaging;
//实例化Bitmap
Bitmap image = new Bitmap(300, 50);
//从bitmap实例创建Graphics实例
Graphics graphics = Graphics.FromImage(image);
//以黑色填充图片
graphics.Clear(Color.Black);
//定义绘制文字的字体和大小
Font font = new Font("宋体", 16);
//定义绘制文字的颜色
Brush brush = new SolidBrush(Color.White);
//绘制文字
graphics.DrawString("励志工作室", font, brush, 0, 0);
//释放Graphics对象
graphics.Dispose();
Response.Clear();
Response.ContentType = "image/pjpeg";
//将图片保存到Response的输出流中
image.Save(Response.OutputStream, ImageFormat.Jpeg);
//写入到Response输出流中
image.Dispose();
Response.End();
- GDI生成图片
- GDI+批量生成图片
- C++ GDI+ 多张图片合并生成GIF动画格式图片
- GDI+读取图片
- GDI+ 图片拉伸变形
- Web GDI+显示图片
- GDI+ 图片黑白处理
- GDI显示PNG图片
- GDI+ 转换图片
- gdi& gid+ 平铺图片
- 使用GDI绘画图片
- GDI+保存图片
- GDI+ 制作透明图片
- vc gdi+缩放图片
- gdi+保存图片
- GDI操作PNG图片
- GDI+ 保存图片
- gdi+ 图片缩放算法
- 无奈啊》。。
- diff命令比较两个文件的不同
- 进程间通信方式
- 基于allocator实现的内存共享
- ubuntu上arm-linux-gcc交叉环境搭建问题解决
- GDI生成图片
- image to stream & stream to image
- Android使用ksoap2调用C#webservice
- 移位思考
- android调用.net编写的webservice
- 技巧:解决文本框密码框长度不一致的问题
- Zend Framework学习心得二:zf框架的第二种配置
- Oracle NVL 函数
- diff了一下,我的svn的ffmpeg和在网站上下载的最新的ffmpeg 0.6.1