Add support for cropping with correct rotation.