当前注册人数422991人 邮箱: 密码: 注册新用户 忘记密码
首页 C/C++/MFC C# ASP.NET VB.NET MATLAB Android   站内搜索 下载代码说明/积分规则
为什么要注册?

1. 可以直接免费从本站下载代码,防止邮件发送不到您的邮箱,或登录不了国外网站

2. 可以设定关键字,当有您关心的代码收录时,邮件通知您

3. 对这里的代码进行评分和评论

4. 可以和大家一起分享你的源代码,得到更多的建议

Free Source Code for an ASP.NET server control that allows the end user to upload an image and crop, scale, and optimise it to obtain a satisfactory web image

客户端浏览器上可以直接对图像进行裁剪缩放和优化为web图像的ASP.NET控件

2008年06月01日
C#, Javascript, Windows, .NET 2.0, .NET, WebForms, ASP.NET, GDI+, VS, VS2005, Dev
这个控件实现与.NET1.1环境中,作为一个ASP.NET控件,它可以允许用户在客户端上传一幅图像到服务器上,并在浏览器中直接对图像进行裁剪、缩放、修改成为一个web可用的图像。
相关知识

源代码中包括8个源文件,它们的功能分别是:

    * WebImageMaker.cs

      The source code for the server control class, WebImageMaker. Also contains definitions of three enumerations – ControlMode, which keeps track of what the control is currently doing (e.g., displaying the canvas), and WebImageFormat and WebImageQuality, which are also attributes of the control and allow the developer to enforce how the final web image is created.
    * IImageProvider.cs

      An interface that defines the operations the control needs to perform on images. By encapsulating this, we could switch to a different image library in future. Most of the file I/O is done in here as well, because drawing APIs typically have the ability to read and write images to and from disk, and it might be unnecessarily awkward to separate out I/O operations from drawing operations.
    * ImageProviderImpl.cs

      An implementation of IImageProvider that uses the GDI+ libraries in System.Drawing.
    * WebImageMakerImageHelper.cs

      A helper class that's used to serve the images the control creates. This is separated off to optionally allow the control's generated images to be served by a different handler.
    * WebImageMakerHandler.ashx

      Optional HttpHandler to use if you don't want the control itself to handle the serving of its generated images.
    * WebImageMaker.css

      Client side stylesheet that sets the CSS attributes for the various elements rendered by the control.
    * WebImageMaker_canvas.js

      Client-side script that powers the user interface when the control is in Canvas mode.
    * WebImageMaker_normal.js

      Client-side script that helps display thumbnails for previously uploaded raw image files, when the control is not in Canvas mode.
 

源代码原文下载:
Dealing with images in content management systems, Part 1 The solution is an ASP.NET server control that allows the end user to upload an image from the local file system, and crop, scale, and optimise it to obtain a satisfactory web image. The server control inherits from the new CompositeControl class, which makes it easier to compose new server controls out of existing, simpler controls. This control makes heavy use of JavaScript, DOM, and CSS on the client to power the user interface, and requires a modern web browser. It will work in Firefox across all platforms, IE6 on Windows, and Safari on MacOSX.

源码图片

点击链接查看大图
从本站下载附件及源代码(1个附件,已经成功下载852次)

最值得关注的外文源代码

Event Calendar [ ASP.NET 2.0 / C# ]
Image format Conversion, Overlay, Scale, Rotate, Reverse, mirror, Filp, Compress using GDI+
Free Source Code for Image Resizing Library
Thumbnail Image Viewer Control for ASP.NET 2.0
评论(评论是增加积分的一个有效途径)
字数在300字内
请如实评论
本源代码共评论74次,此处显示最近20次评论! 查看所有评论

aaa  2012年12月07日
GOOD
syldjzl  2012年11月18日
下载学习一下
h460562952  2012年09月25日
先看看会不会刷新呀,看起来不错呀!
空心菜  2012年07月16日
非常好,谢谢
阿丹  2012年05月25日
需要中!!谢谢了
阿丹  2012年05月25日
working
xw628  2012年02月07日
需要中!!谢谢了
cx4359481  2012年01月31日
谢谢分享
woners  2012年01月31日
正在找相关的,谢谢了
simple  2011年11月10日
这个好啊。
sai1253  2011年09月19日
学习!ng
Yes_Know  2011年06月30日
Very good,if there is to be automatic zoom is better.
Yes_Know  2011年06月30日
Very good,if there is to be automatic zoom is better.
454958715  2011年04月23日
hehe
@.com  2011年03月18日
学习!ng
sure  2011年01月13日
up up up
紫炎  2011年01月12日
学习需诶下
mars  2010年12月22日
very good
小色  2010年08月12日
谢谢了,感觉非常好,可以进行裁剪,下载下来学习之
蓝天枫  2010年04月01日
好代码,好程序,谢谢分享了~!
字数在300字内
请如实评论
200万国内源码搜索
CopyRight (C) codesoso.com 2007-2009 All Rights Reserved zhihuishi   免责声明