add safe_open_image function in common