Separate cropping and calc of image stats.
Remove deprecated code.