We had exactly this problem to solve on the current project that I'm working on.
I wanted to use something like this for Umbraco which allows you to set a focus point:
However unfortunately despite looking extensively I couldn't find anything that had been built already.
There are a couple of modules such as this:
Which I looked at but they don't support setting a focus point unfortunately.
So in the end we implemented our own getMediaStream pipeline processor using code similar to this excellent post by Anders Laub to center crop the images:
As part of this we also implemented support for responsive images with picture element and srcset + similar support for background images too. This means for smaller devices (such as iPhone & iPads) we call the custom media handler with a request for a medium, small image which means smaller file size and a faster experience for the user on smaller screens. We also handle Retina images in this way too.
It outputs markup similar to the following:
<source data-srcset="https://mysite.com/-/media/group-image.jpg?mw=374&mh=238&as=1&centercrop=1, https://mysite.com/-/media/group-image.jpg?mw=561&mh=357&as=1&centercrop=1 2x" media="(min-width: 800px)"
srcset="https://mysite.com/-/media/group-image.jpg?mw=374&mh=238&as=1&centercrop=1, https://mysite.com/-/media/group-image.jpg?mw=561&mh=357&as=1&centercrop=1 2x">
I also created a focus point setting tool for the content editor, but haven't yet fully tested it so we are using centre crop on it's own currently. Once I complete it, if there is enough demand to do so I'll try and package it up as a module if I can.
This is what the focus point selector looks like currently, it's built using SPEAK UI and allows the user to click on the image and stores the x/y of the focus point. This can then be picked up by the image processor and used instead of the centre of the image:
Anyway hopefully this will get you started with things and give you ideas to consider.
I wasn't allowed to open source this but Saad Khan built something similar which you can find a blog post on here:
This Module can be found on the marketplace here (and on Github):
There is a video on how it works here too: https://www.youtube.com/watch?v=JxqHYoASUx0&feature=youtu.be
I think it works in Sitecore 8 but I'm not sure about Sitecore 9. You may find the code is more up to date on Github.
Another Interesting Article
This blog post is in Dutch but if you use Google Translate it is a good read and might give you some ideas on how to approach this using SPEAK 3 instead:
BrainJocks also have support for this in their BrainJocks SCORE™ 3.0 product for Sitecore: