I have images that are a variety of sizes and aspect ratios. I want to take a (square) crop of the middle part of each image, but discard as little as possible of each. To do this I assume I have to first resize each image so that it's smallest dimension is that of the cropping square. Then crop an equal amount from either 'overlapping' side (ie. either top and bottom, if the picture is portrait, or left and right, if the image is landscape).
BTW, I would also like to know if there is a way to crop the centre part of the image without first having to know it's dimensions and calculate where to place the corner point of the cropping rectangle.
If anyone has a simple one-step command for doing this I would be even more grateful

Cheers
JamesR