There are provided an image coding method and apparatus and image
compression method and apparatus which can properly compress a color
document image with a high compression efficiency. First of all, a color
reduction processing unit (102) converts each pixel of a color document
image into an index assigned in correspondence with a color value, and
generates color information (103) containing the number of pixels for
each indexed color and an index color image (104). A color information
sort unit (105) and the like determine, for example, a color value
corresponding to an index of the maximum number of pixels as a background
color. An order determination unit (113) determines an order. A binary
image generation compression unit (109) generates a partial binary image
for each index and compresses the binary image according to the order. A
data integrating unit (111) generates compressed image (112) by
integrating background data (108) and the compressed data of the partial
binary image.