The invention relates to the field of
information processing, in particular to a generation type
image compression method and device suitable for text documents. The method comprises the following steps: (1) converting a
text document into an RGB
bitmap; (2) pre-constructing a
color table according to the characteristics of the
text document; (3) mapping and indexing the RGB
bitmap, mapping the RGB value of each pixel with a
color table, finding the closest color value in the
color table, determining a corresponding index color, and recording an index number to form an index
color image; and (4) compressing the image data area according to an LZW or other
data compression algorithm to form a final image file. By means of the
image compression method, reasonable filtering and denoising areadaptively conducted on the document official document, original character and color information is reserved as much as possible in the image scanning and compressing process, denoising is simple andhigh in speed, a document conversion
algorithm is easy to program, and the
image compression method is suitable for
document storage work with the document official document type pixel low in color complexity.