In reply to Colin Devroe.

For those cases, it's best to do that on the server-side with the add_image_size() function (set a specific width and height, then hard crop to true). I wanted the above to work alongside a range of image sizes since the theme is not going to control which size a user selects.