convert a image directly to a cropped avatar