Added functionality to crop images