PDE-based image inpainting has become a very active area of research after the pioneering works of Masnou and Morel, Bertalmı´o et al., and Ballester et al. In this paper, we take a different approach, inspired by the excellent work of Caselles et al. We view the inpainting problem as a particular case of image interpolation in which we intend to propagate level lines. Expressing this in terms of local neighborhoods and using a Taylor expansion we derive a third-order PDE that performs inpainting. This PDE is optimal in the sense that it is the most accurate third-order PDE which can ensure continuation of level lines. The continuation is strong, allowing the restoration of thin structures occluded by a wide gap. The result is also contrast invariant. This is a novel PDE, which, in both its accuracy and contrast invariance, outperforms the approaches cited above.