Gradient Adjusted Predictor (GAP) uses seven fixed range of slope quantization bins and different predictors associated with each bin, for prediction of pixels of all kinds of images. Criteria for range of slope in the bins and associated predictors are not reported in the literature. This paper presents a technique for slope quantization bins which are optimum for a given set of images. It also presents a technique for finding a statistically optimal predictor for a given range of slope bin. Simulation results, for medical images, using optimal slope bins and associated predictors show a significant better compression performance as compared to the other methods such as GAP and Edge-Directed prediction (EDP) method. The proposed method and GAP has same order of computational complexity while EDP is computationally much expensive. © 2005 IEEE.