Implementation of cropping images