Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On top of the obvious (resize to largest dimension, crop smallest) I'm guessing they set an anchor point on the image rather than use the center.

For example, the pig's face isn't centered. So rather than returning the center of the image, they crop the sides proportionally to the anchor point on the pig's face.

Edit: Nup. They just crop it down the middle. If you're the developer feel free to steal the above.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: