Lossless image compression is needed in many fields like medical imaging, telemetry, geophysics, remote sensing and other applications, which require exact replica of original image and loss of information is not tolerable. In this paper, a near lossless image compression algorithm based on row by row classifier with encoding schemes like Lempel Ziv Welch (LZW), Huffman and Run Length Encoding (RLE) on color images is proposed. The algorithm divides the image into three parts R, G and B, apply row by row classification on each part and result of this classification is records in the mask image. After classification the image data is decomposed into two sequences each for R, G and B and mask image is hidden in them. These sequences are encoded using different encoding schemes like LZW, Huffman and RLE. An exhaustive comparative analysis is performed to evaluate these techniques, which reveals that the proposed algorithm have smaller bits per pixel (bpp) than simple LZW, Huffman and RLE encoding techniques.