before deal with image