Patent ID: 8711372

Claim:
A computer-implemented method comprising: performing an analysis corresponding to a sequence of drawing commands from a drawing instruction stream that create a bit-map when executed, wherein performing the analysis corresponding to the sequence of drawing commands comprises classifying each of the commands into groups as each of the sequence of drawing commands are examined in sequence; and generating a set of image segments that group drawing commands from the sequence together for encoding, each image segment grouping one or more drawing commands to be encoded as a separate image based on drawing command type, where each of a plurality of different drawing command types is defined, at least in part, on a corresponding drawing command opcode, determined from the analysis of the sequence of drawing commands, wherein the generated set of image segments having one of a plurality of different encoding methods selected for each image segment in the set to achieve a highest level of compression with a least amount of distortion, the selection based on a drawing command type associated with each image segment, wherein generating the set of image segments further comprises: generating a first bitmap for a first of the groups of one or more drawing commands, saving the first bitmap when the all drawing commands in the first group have been analyzed, and creating a second bitmap for a second of the groups of one or more drawing commands.