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();
}
{
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();
}
相关文章推荐
- WebView加载网页不显示图片解决办法
- System.Web.Mail 邮件正文显示图片
- 关于web前端,css小技巧的笔记——图片动态比例显示
- Android 5.0中使用webView 加载网页不显示图片问题
- MyEclipse中创建WEB工程,运用<img>标签显示图片等,但无法显示问题
- Android webview Mixed Content无法显示图片解决
- web.xml中DispatcherServlet排除静态资源的拦截 / 图片上传到了WEB-INF目录下,应该如何显示?
- Android中图片的展示之Webview居中显示图片
- JAVA WEB开发中显示图片的问题
- GDI+中GIF图片的显示
- iOS 使用SDwebImage缓存图片并在断网时候显示
- webview显示图片是自适应显示
- gdi+ 第二个程序,显示图片
- SDWebImage显示GIF图片
- iPhone开发之webview 拖动和显示本地图片的几组代码
- ios的webView加载本地html图片路径显示及webview适配
- Android使用WebView显示网页(图片缩放)
- 实现WebView中点击图片显示大图
- web小项目---图片显示实时在线人数小程序
- WEB中上传图片即使显示