0

Possible Duplicate:
How to crop an image using C#?
Resize a picture to a fixed size

I am trying to achieve what facebook is doing with users' images. That is, you upload a full sized picture, but in the profile you have a smaller & cropped image so it will be nicer in the design of the page.

where can I find such algorithm in c#?

thanks!

Community
  • 1
  • 1
Himberjack
  • 5,682
  • 18
  • 71
  • 115
  • You can use the `Bitmap` library and crop it [very easily](http://www.switchonthecode.com/tutorials/csharp-tutorial-image-editing-saving-cropping-and-resizing). (How you store and retrieve it after (cashed vs. on-demand) is up to you). – Brad Christie Nov 23 '11 at 19:09
  • @DavidStratton: Looks like OP is asking to crop not resize... – Brad Christie Nov 23 '11 at 19:10
  • I picked the wrong one from the list... My bad, but this question has been asked. Thank you, @docmanhattan for getting the *correct* previous question. I stand by my vote to close, even if I picked the wrong one. – David Nov 23 '11 at 19:13

1 Answers1

1

I worked on something similar a while back. For starters, take a look at Miron Abramson's blog post. Also, you may want to consider doing the cropping and resizing on the client side first before interacting with the server or third party asset repo (s3, etc.) Here's one third party tool that might meet your need.

jimlyndon
  • 33
  • 1
  • 4