pre_process of image