This paper describes a new method for lossless image compression where relative pixel values of localized neighborhoods in test images are stored in a codebook. In order to achieve decorrelation of an image's pixels, each neighborhood of a pixel is assigned to a neighborhood in the codebook, and the diierence between the actual pixel value and the predicted value from the codebook is coded using an entropy coder. Using the same codebook, one can achieve perfect reconstruction of the image. The method is tested on several standard images and compared with previously published methods. These experiments demonstrate that the new method is an attractive alternative to existing lossless image compression techniques.