add image pretreatment