0

When I upload an image, it is quite big some times, I have to create its thumbnail in a specific way.

What I want is if I declare the size of 96x69 for the thumbnail, those uploaded images which are scalable to this resolution should be scaled, and those uploaded images which are quite different in wxh, example 1000x1000, they should be cropped to maximum better scalability. Is there any fast library or built in code as I have tried to do in my own way but it is not that perfect?

enter image description here

tashuhka
  • 5,028
  • 4
  • 45
  • 64
Muhammad Atif Agha
  • 1,535
  • 3
  • 33
  • 74
  • check out this post: http://stackoverflow.com/questions/249587/high-quality-image-scaling-c-sharp – Dunken Mar 29 '14 at 08:50
  • Similar to this post: http://stackoverflow.com/questions/18014365/c-sharp-crop-image-from-center/27164374#27164374 – h3n Nov 27 '14 at 06:35

2 Answers2

2

I strongly recommend ImageResizer which can be found freely on the Nuget. Basically, resizing images is a sophisticated procedure that may be included variety techniques such as cropping, scaling, resizing, moving, trimming, etc. that implementing each of these methods is not an easy job. Hence, it's better to use image-resizer.

Ali Dehghan
  • 462
  • 3
  • 6
-1

you can use jquery for solving this problem. If its feasible in your project to do it client side. Check these link here.. http://www.jqueryrain.com/demo/jquery-crop-image-plugin/ and https://code.google.com/p/resize-crop/ this one is best and easiest i guess.

If you want to do it server side for some reason, then have a look on solution mentioned in this question. Which free image resizing library can I use for resizing and probably serving images?

Hope this will solve your problem.

Community
  • 1
  • 1
Malkit Singh
  • 349
  • 1
  • 8
  • If i use JQuery image resizing, will it have effect on my bandwidth? Will the browser load the same heavy image or jquery will stop it doing so and will load only thumbnail, i am very much worried about this thing. – Muhammad Atif Agha Mar 29 '14 at 10:32
  • 1
    all conversion would be done client side, what bandwidth has to do with this? – Malkit Singh Mar 31 '14 at 09:32