Proper image cropping for photo carousel on mobile

For a mobile app running on a tablet of unknown aspect ratio, what is the best way to present photos such that as much screen real estate is used (minimize black bars) while ensuring important parts of the photo are not cropped (i.e. someone's head!)?

Are there limits such as, "crop up a max xx% of width/height?"