Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
How To resize Image Without Crop And Padding
Dr.Ajay Kashyap
Feb 20 2017 3:36 AM
338
Reply
hello friends ...
I am Uploading single Image And That image i convert in different Size Because That Image I want in 5 different Size But The Problem Is Some Images Are Crop And Padding That I Want To Avoid .....So How To Avoid It ...This All I am Doing Using Asp.Net Mvc ..
Given Below Is My Code Of Image Resizer :-
public static string UploadFile(HttpPostedFileBase file, string file_Name, int height, int width)
{
var path = Path.Combine(HttpContext.Current.Request.MapPath(UploadPath), file_Name);
file.SaveAs(path);
ResizeSettings resizeSetting = new ResizeSettings
{
Width = width,
Height = height,
Mode = FitMode.Crop,
Quality = 90
};
ImageBuilder.Current.Build(file, path, resizeSetting);
return file_Name;
}
Attachment:
ImageRenameResizeUpload.rar
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Set Crystal Reports Local Parameeters
Page to load Actixe X third party