in reply to Rotated Cropping in ImageMagick?

Assuming you are feeling too lazy to code the right trig, the easiest shortcut would be to crop a square centered on your final image with sides equal to the diagonal of your final image. Pythagoras tells us that's the square root of the sum of the squares of your final dimensions. Maybe +10% just in case.