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

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个附件,已经成功下载278次)

最值得关注的外文源代码

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字内
请如实评论
本源代码共评论42次,此处显示最近20次评论! 查看所有评论

蓝天枫  2010年04月01日
好代码,好程序,谢谢分享了~!
Sheena  2010年01月25日
非常感谢。。。
coco168  2009年11月04日
图像进行裁剪缩放和优化为web图像的ASP.NET控件
ylgshuai  2009年06月13日
感谢楼主。
dotKevin  2009年06月06日
太棒了~ 感謝
liyachi  2009年05月13日
web的啊,非常有用,多谢,多谢
艾妮  2009年04月24日
谢谢分享,非常的实用
O(∩_∩)O~  2009年04月23日
web的啊,非常有用,多谢,多谢
alexdai  2009年03月03日
good
narnia2008  2009年01月31日
谢谢
yaohai_120  2009年01月03日
多谢共享
wolfzero  2008年12月31日
非常有用
df3855  2008年12月03日
太好了
wellfuture  2008年10月31日
太好了,我正好用上。。。
good  2008年10月29日
太好了,我正好用上。。。
piu_piu  2008年10月02日
web的啊,非常有用,多谢,多谢
pc1024  2008年10月01日
is good
billsoft  2008年09月08日
雪中送碳!
66888888  2008年09月05日
正在找这样的控件
leiryhp  2008年08月26日
客户端浏览器上可以直接对图像进行裁剪缩放和优化为web图像的ASP.NET控件
字数在300字内
请如实评论
CopyRight (C) codesoso.com 2007-2009 All Rights Reserved   免责声明
京ICP备08011023号