initial image processing