Allow cropping images by ratio, even if they only have a min width and min height set

PMD duplicate code