We formulate Differential Pulse Code Modulation (DPCM) for image compression as the minimization of a quadratic cost function. Non-causal interpolation error image in lieu of causal prediction error image can be coded in this fashion providing efficient compression. We implement the optimization process through the dynamics of Cellular Neural Networks (CNNs). Two CNNs, one of them operated in binary mode and the other in gray level mode, are used in the coding stage. The first CNN creates an optimum differential image while the other tries to create a replica of the reconstructed image of the receiver. Decoding is realized by another gray level mode CNN fed by tice differential image.