Fix crop image issue with large images