prevent crops larger than output image