add process image function