Could you make it so the image is first cropped to the largest possible square in the middle of it? The way it is now, rectangular images will have their aspect ratio altered.

Bonus point if you add a settings that specifies the relative size of the square (1 = maximum possible, 0.5 = half of maximum, and so on) so that thumbnails will focus on whatever detail is at the center of the image.

It's not hard with PIL.