How can I crop/scale user images so I can display fixed sized thumbnails without skewing and stretching?
问题 I'm working on allowing users to upload profile pictures for my site. The classic example of what I'm trying to avoid is plentyoffish.com where each users image is skewed and looks very ugly: So, how can I progmatically crop/create standard sized versions of an image without the skewing demonstrated above? 回答1: Well, you must have a maximum height and width, lets assume the image size you have available is square, say 100x100. When a user uploads an image get the dimensions of it, then work