title: Cropping rotated image with same aspect ratio
body: <p>How can I find out the width and height of the final image when the input image is rotated by given amount of degrees and then cropped to avoid any non-image areas while maintaining the original image aspect ratio.</p>
  
  <p>example:
  <img src="https://i.stack.imgur.com/8Ylno.jpg" alt="example"></p>