Reputation: 1545
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?
Upvotes: 0
Views: 1262
Reputation: 462
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.
Upvotes: 2
Reputation: 349
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.
Upvotes: -1