The inpainting of damaged images has a wide range of applications, and many different mathematical methods have been proposed to solve this problem. Inpainting with the help of Cahn{Hilliard models has been particularly successful, and it turns out that Cahn{Hilliard inpainting with the double obstacle potential can lead to better results compared to inpainting with a smooth double well potential. However, a mathematical analysis of this approach is missing so far. In this paper we give first analytical results for a Cahn--Hilliard double obstacle inpainting model regarding existence of global solutions to the time-dependent problem and stationary solutions to the time-independent problem without constraints on the parameters involved. With the help of numerical results we show the effectiveness of the approach for binary and grayscale images.