Implemented image cropping