.NET生成缩略图
2004-08-09 23:15
253 查看
MemoryStream stream1 = new MemoryStream((byte[])detail.Image);//取图片数据流,你自己读文件先.
System.Drawing.Image tempimg = System.Drawing.Image.FromStream(stream1);//转成图片类
System.Drawing.Image myThumbnail = tempimg.GetThumbnailImage(width,height,null, IntPtr.Zero);//缩略,width,height你自己要定义好大小
myThumbnail.Save(Response.OutputStream,tempimg.RawFormat);//显示
System.Drawing.Image tempimg = System.Drawing.Image.FromStream(stream1);//转成图片类
System.Drawing.Image myThumbnail = tempimg.GetThumbnailImage(width,height,null, IntPtr.Zero);//缩略,width,height你自己要定义好大小
myThumbnail.Save(Response.OutputStream,tempimg.RawFormat);//显示
相关文章推荐
- .net生成缩略图及水印图片时出现GDI+中发生一般性错误解决方法
- .Net 上传图片并生成高清晰缩略图
- .net 生成缩略图技术原代码
- .net上传图片文件,生成缩略图,并写上版权信息
- .net又一个生成缩略图的方法
- .NET生成WEB缩略图
- .NET 等宽、等高、等比例、固定宽高生成缩略图 类
- .net生成缩略图,支持等比例缩放,加水印
- .net图片操作类,生成缩略图,上传图片截取,上传图片打水印
- .NET图片压缩和生成缩略图
- .net又一个生成缩略图的方法,不变形
- .net生成高清缩略图备忘
- .net生成缩略图
- .net 2.0 生成缩略图的方法
- .net 生成缩略图
- .net 生成缩略图
- .NET生成缩略图(转载)
- .net等比缩放生成缩略图的方法
- .net上传图片生成大小缩略图
- .NET生成缩略图