I upload a photo, it is a rectangle. How Can I get it resized and filled to a square ?
I mean when the photo is horizontal positioned it should have above and under it, two white fields (for keeping the shape of a square) and when it is vertically, it should have two white fields on the sides of the photo.
When I used PHP, a have used this http://www.verot.net/php_class_upload_samples.htm
Have a look at the
100x150, keeping ratio, filling top and bottom
example
I'm using Paperclip with RoR. How is the best way to do that ?