ASP.NET镜像大小调整和裁剪

Muh*_*nan 6 compression asp.net iis crop imageresizer

我正在寻找ASP.NET图像大小调整,裁剪
好图像重新调整大小,裁剪等任何人都知道请分享

感谢提前

Muh*_*nan 9

好专家!!! 最后一天,我找到了http://www.imageresizing.net/,它很棒.和良好的API.效果很好.从Visual Studio 2010 Extension Manager下载:http://nuget.org/.

在VS-2010中下载API的简单步骤:

1).安装扩展http://nuget.org/.

在此输入图像描述

3).查找并安装ImageResizing
在此输入图像描述

4).然后代码:(我在这里使用裁剪.你可以使用任何)imageresizing.net上的文档

string uploadFolder = Server.MapPath(Request.ApplicationPath + "images/");
FileUpload1.SaveAs(uploadFolder + FileUpload1.FileName);


//The resizing settings can specify any of 30 commands.. See http://imageresizing.net for details.
ResizeSettings resizeCropSettings = new ResizeSettings("width=200&height=200&format=jpg&crop=auto");

//Generate a filename (GUIDs are safest).
string fileName = Path.Combine(uploadFolder, System.Guid.NewGuid().ToString());

//Let the image builder add the correct extension based on the output file type (which may differ).
fileName = ImageBuilder.Current.Build(uploadFolder + FileUpload1.FileName, fileName, resizeCropSettings, false, true);
Run Code Online (Sandbox Code Playgroud)

尝试!!!它非常棒且易于使用.谢谢.