Image compression method and image processing apparatus

The present invention provides an image compression method and an image processing apparatus. The image compression method comprises: dividing an original image into at least one image block; determining a number of color types contained in image data corresponding to each image block; for image blocks whose number of color types is less than or equal to a first threshold, performing compression using a lossless compression algorithm, and obtaining code streams after compression; for image blocks whose number of color types is greater than the first threshold, performing compression using a lossy compression algorithm, and obtaining code streams after compression; combining the code streams obtained after compressing the at least one image block into a unified code stream; and sending the unified code stream to a client. By distinguishing image block types according to the number of color types of each image block, and using the lossy compression algorithm or the lossless compression algorithm to perform encoding compression on image blocks of different types, the present invention can effectively give consideration to reconstruction quality and compression efficiency of a desktop image.