I m looking for ASP.NET Image Resizing, Cropping
that is good in image re-sizing, cropping etc.
Anyone know please share
Thankx In Advance
I m looking for ASP.NET Image Resizing, Cropping
that is good in image re-sizing, cropping etc.
Anyone know please share
Thankx In Advance
Well Experts!!! Last day I found http://www.imageresizing.net/ and its great. and good API. Works Great. Downloaded from Visual studio 2010 Extension Manager: http://nuget.org/.
Easy Steps to download API in VS-2010:
1). Install Extension http://nuget.org/.
3). Find and Install ImageResizing
4).Then Code: (I m using here cropping. you can use any) Documentation on 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);
Try!!! its very awsumm and easy to use. thanks.
This should give you the resizing you need: C# Tutorial - Image Editing: Saving, Cropping, and Resizing. As far as compression, that is going to be a function of the image format you choose e.g., PNG, JPG, GIF. To take control of that, look at the sample code here. Once you've saved to a compressed format, any further compression is (generally) a waste of time.
You really don't need a DLL for that. They are just three functions. Resizing, Cropping and Compression.
Its pretty much covered at Image resizing, cropping and compression using .NET
The only area that need some innovation is the area of cropping where one might need to visually crop images. For that use
© 2022 - 2024 — McMap. All rights reserved.
Bitmap
and copy part of the original image withDrawImage
. What exactly does GDI+ fail to provide? – Luke