Image inpainting, an art of modifying or recovering an image in an undetectable way by ordinary observers, has been drawing considerable attention in recent years. In this paper, we propose a novel algorithm to address this problem based on the variation of variances and the linear weighted filling-in under the local patch consistency constraints on pixel values and the first-order gradient. First, a variation of variances of neighboring source patches approach is applied to assign priority to target patches on the image structures (e.g., edges or corners). Second, a linear weighted filling-in scheme, which uses the combinational information of source patches rather than a single source patch, is applied to reconstruct the estimated patches among which the best matching patch is selected. Moreover, the technique of rotating the on-edge patches is introduced to extend the sample space. Experiments on natural images and comparisons with representative existing algorithms show that our proposed method can more robustly discriminate structures and textures, estimate the best matching patch with more known information, and improve the visual quality.