Patent ID: 7991229

Claim:
A method of compressing a multi-layer digital image, the method comprising the following steps: providing a processor to implement the following steps: (a) accessing a digital image; (b) creating said multi-layer digital image by separating said digital image into a plurality of layers including a foreground layer and a background layer, said foreground layer including the pixels comprising text or sharp lines within said digital image; (c) constructing a foreground mask from said foreground layer; (d) dilating said foreground mask to create a dilated-foreground mask; (e) applying said dilated-foreground mask to said background layer, wherein all background layer pixels defined within said dilated-foreground mask are deemed transition pixels, and all background layer pixels not defined within said dilated-foreground mask are deemed true-background pixels; (f) modifying said background layer by conditionally changing the pixel colors of select transition pixels to colors determined by the colors of their nearest true-background pixels; (g) individually compressing said foreground layer, said foreground mask and the modified background layer.