update image crop logic