A new image inpainting algorithm is proposed based on the Criminis method.To reduce the computation amount,the matching region is determined in the source region by calculating the gradient of the point to be inpainted,and then the matching blocks are searched in this region using the increasing order of distances between blocks and the point to be inpainted.The recent optimal matching block is used for inpainting.Finally,in order to avoid accumulation of the errors,a new method to update the confidence term is proposed.Experiments show that our proposed algorithm is efficient for image inpainting.