In this invention, image data expressed by one component is encoded at a high speed by using a color image lossless encoder. To do this, a color conversion unit converts color image data read by a document reading unit into C, M, Y, and K data. In a color reading mode, a switching unit directly outputs the C, M, Y, and K data to an encoding unit. If the reading mode is a monochrome reading mode, the switching unit neglects the C, M, and Y components of the C, M, Y, and K data. Every time four K components are input, the switching unit supplies the four K components to the encoding unit as pseudo data of C, M, Y, and K color components. The encoding unit lossless-encodes the received C, M, Y, and K component data.