Patent ID: 8559741

Claim:
A lossless image compression method, for processing an image having a plurality of pixels, wherein an image width of the image is W, the lossless image compression method comprising: (a) selecting N continuous pixels from the image, where N is a positive integer greater than or equal to 2 and is less than the image width W; (b) performing a differential pulse code modulation (DPCM) means, so as to obtain N non-negative differences corresponding to the N pixels according to values of the N pixels, the DPCM means comprising: obtaining N pixel differences individually corresponding to the N pixels according to the values of the N pixels; and performing a main means on the N pixel differences individually, so as to obtain the N non-negative differences individually corresponding to the N pixel differences, the mapping means comprising: when the ith pixel difference d i in the N pixel differences is greater than or equal to zero, obtaining the corresponding ith non-negative difference n i by multiplying the pixel difference d i by 2, where 0<=i<N; and when the ith pixel difference d i in the N pixel differences is less than zero, obtaining the corresponding ith non-negative difference n i by subtracting 1 from a result obtained by multiplying the pixel difference d i by 2; (c) calculating to obtain a coding parameter according to the N non-negative differences; and (d) coding the N non-negative differences according to the coding parameter.