首页 [ 控件应用 ] Web Image Resize Handler源码
一键分享

Web Image Resize Handler源码

  • 免费

2011-10-19 09:39:52

收藏 156 次|关注 3063 次|下载 210 次

免费


交付物: 源码包
    商家已实名认证
  • 分享者:capad***
  • 访问次数:   10864 次
  • 源码数量:   112 套
  • 通过比率:   97%
  • 活跃于:   三个月前
  • QQ:   582****
  • 最新IP属地:呼和浩特市
  • 微信扫码咨询
.net

源码介绍

源码参数

  • 源码类别:【控件应用】
  • 源码类型:B/S
  • 适合人群: 进阶高手
  • 授权类型:免费版
  • 开发语言:C#
  • 数据库:无数据库
  • 源码大小:3.19MB
  • 相关网址: 【免费浏览】
  • 源码指数:
  • 完整度:
  • 按比率缩放
  • 拉伸图片
  • 旋转图片
  • 按比率缩放
  • 拉伸图片
  • 旋转图片
  • Aspx.Query.CodeImageQueryModel
  • Aspx.Query.CodeImageQueryModel
  • Aspx.Query.CodeImageQueryModel
 Web Image Resize Handler源码

高效的基于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

责任编辑:wxd

下载记录(Only Recent 100)

用户名 推荐指数 下载时间

源码评论

单击更换

评论列表

全部评论
  • 暂无评论 …

最近更新

      下载排行