Skip to Main Content
High quality of compressed image is required in many fields such as remote sensing and medicine. A near-lossless image compression algorithm is proposed in this paper. The algorithm takes advantage of the effects of the distribution of pixels on compression ratio. The pixels are classified row by row firstly, and the classification result is recorded in a mask image. After that the image data is decomposed into two sequences, and the mask image is hidden in them. Finally the sequences are encoded using LZW algorithm. Experiment was conducted on some ISO/IEC test images and some ordinary images. The result showed that the proposed algorithm produced higher compression ratio than LZW, RLE and Huffman encoding; and the PSNR is large. The proposed algorithm is also easy to implement.