- 51Aspx源码必读 .txt[4KB]
- from.gif[4KB]
- WebImageResizer.sln[3KB]
- 最新Asp.Net源码下载.url[123B]
源码介绍
源码参数
高效的基于web的图片处理程序,可以对图片进行旋转,格式,缩放和灰度处理,程序使用C#编写。
一个ASP.NET可扩展的通用图片处理程序,使用了filter。五种filter可用:resize, zoom, rotate,
greyscaling and formatting(jpg, gif, tif, png)
作者添加了2种编码库来处理小图。WPF内置的bitmap编码和 FreeImage library。在测试中
FreeImage 制作最小的图片并且为默认的bitmap编码,在demo中。
使用一个从IImageProvider接口中抽象出来的ImageProvider获得原始图像,例如从CMS,数据库,硬盘
或者其他任意位置。一个继承了IImageProvider接口的类实现了从硬盘读取文件。
默认会处理下面的URL参数:
src: Key to an image, can be a relative url, guid or whatever you want
width: Width in pixels without any unit specification
height: Height in pixels without any unit specification
format: 格式化输出图像: png, gif, jpg, tif
greyscale: any non empty value triggers grey scaling
rotate: Invariant Culture floating point number in degrees where 360 is a complete rotation.
zoom: Invariant Culture floating point number indicating scale value. If 2 is specified the output will be double the original size.
如果需要的话,参数可以组合使用。
示例Url(只做说明使用,并不能真正使用)
// Returns the image mapping to /bla.jpg resized to width of 100 pixels preserving aspect relative to height
http://webimageresizer.codeplex.com/ImageHandler.ashx?src=/bla.jpg&width=100
// Returns the image mapping to /bla.jpg resized to height of 100 pixels preserving aspect relative to width
http://webimageresizer.codeplex.com/ImageHandler.ashx?src=/bla.jpg&height=100
// Returns the image mapping to /bla.jpg resized to width 100 pixels and a height of 50 pixels
http://webimageresizer.codeplex.com/ImageHandler.ashx?src=/bla.jpg&width=100&height=50
// Returns the image mapping to /bla.jpg resized to 2.5 times the original size
http://webimageresizer.codeplex.com/ImageHandler.ashx?src=/bla.jpg&zoom=2.5
// Returns the image mapping to /bla.jpg resized to 2.5 times the original size and rotated 45 degrees,
http://webimageresizer.codeplex.com/ImageHandler.ashx?src=/bla.jpg&zoom=2.5&rotate=45
// Returns the image mapping to /bla.jpg resized to 2.5 times the original size, rotated 45 degrees and greyscaled
http://webimageresizer.codeplex.com/ImageHandler.ashx?src=/bla.jpg&zoom=2.5&rotate=45&greyscale=1
下载记录(Only Recent 100)
用户名 | 推荐指数 | 下载时间 |
---|