摘要 |
<p>The present invention provides an image compression method. The method comprises: performing image edge detection on an image to be compressed to determine a non-edge part of the image to be compressed; on the basis of the similarity of pixel colors in the non-edge part, dividing the non-edge part into a plurality of pixel communicating areas, the pixel communicating areas consisting of a pixel selected when the pixel communicating areas are divided, and continuous adjacent pixels with colors similar to that of the selected pixel; setting the color of each pixel communicating area to the color of the selected pixel; on the basis of the similarity of the colors of the pixel communicating areas, combining the colors of the pixel communicating areas; and compressing the image to be compressed by using the combined color. By the method, the number of image colors required for image compression can be determined by combining the characteristics of the image to be compressed, thereby effectively reducing the size of an image file under the condition that an image effect is not changed substantially.</p> |