0

I am looking for a simple image resize + cropper. No need for upload functionality, just a handy gui for resizing and cropping.

I found http://i-load.radactive.com/ but that has been discontinued, does anyone have a good alternative?

Roger Far
  • 2,178
  • 3
  • 36
  • 67
  • Use http://imageresizing.net. It's the standard solution, and very mature. [Here's how to use it with jCrop](http://nathanaeljones.com/573/combining-jcrop-and-server-side-image-resizing/). – Lilith River Jul 17 '11 at 09:14

3 Answers3

1

Kon's answer is blissfully ignorant of the 28 pitfalls that most "copy and paste" solutions face. You should use the http://imageresizing.net library. It's been refined for 4 years, and is very stable and mature. And it's free.

Here's how to crop and resize interactively using the library. It's very simple.

If you want to auto-crop and center, just add ?width=x&height=y&crop=auto to the target image URL.

Lilith River
  • 16,204
  • 2
  • 44
  • 76
0

You don't need any special library outside of .NET for it. How to do it has been discussed on SO:

Best resize and or crop logic

How to crop an image using C#?

Also, this may help: Image Resizing and Cropping in C#

Community
  • 1
  • 1
Kon
  • 27,113
  • 11
  • 60
  • 86
  • sure, but I rather find a ready to use component than wasting my time writing my own, while others probably wrote better. – Roger Far Jun 20 '11 at 11:28
  • This makes sense in many cases, but I disagree in this case. It's not a lot of code, it's free, and you can optimize it for your needs. While a third-party lib would probably save you a few lines of code, it'll probably come with overhead costs (and actual cost). If you've spent the time to post the question on SO, then you've got enough time to copy/paste 114 lines of code. IMHO. – Kon Jun 20 '11 at 11:32
  • Copy and pasting 114 lines of code generally means duplicating [the 28 bugs everyone makes in image cropping and resizing code](http://nathanaeljones.com/163/20-image-resizing-pitfalls/). – Lilith River Jul 17 '11 at 09:11
  • Show me one. Haven't seen one yet. – Lilith River Jan 09 '12 at 22:12
0

There are two parts to make this work.

First part is the javascript, you need to make the selection to crop on the browser side. For that I use the jCrop but there are more other.

Ones you get the cordincate from the javascript code, you pass it on post back on the code behind that you make the resize and the crop.

Aristos
  • 66,005
  • 16
  • 114
  • 150