Resize/crop/pad a picture to a fixed size
This solution is basically the same as Can Berk Güder’s, but after having spent some time writing and commenting, I felt like posting. This function creates a thumbnail that is exactly as big as the size you give it. The image is resized to best fit the size of the thumbnail. If it does not … Read more