Patent ID: 7382916

Claim:
A method for reducing the size of a bitmap, the bitmap representing a plurality of pixels, each pixel being represented by a bit pattern, the method comprising: counting the number n of different bit patterns included in an original bitmap; determining if the number n of different bit patterns included in the bitmap is less than a number of entries in the second palette data structure; creating, for later reuse, a first palette data structure having at least n entries, each one of the different bit patterns in the original bitmap having at least one corresponding entry in the first palette; and replacing, in the original bitmap, the bit patterns with a pointer to a corresponding entry in the first palette data structure to thereby generate a normalized bitmap, wherein each of the entries in the first palette data structure provide a pointer to a corresponding entry in a second palette data structure containing an indication of a color to be displayed when representing a bit pattern corresponding to the entry in the first palette data structure, wherein the creating and replacing operations are performed in response to the number n of different bit patterns included in the bitmap being less than a number of entries in the second palette data structure.