An information processing apparatus connected to an image forming unit that forms an image based on image data and a reading unit that reads an image as image data is provided. The apparatus acquires a pixel count of image data formed by pixels; encodes the at least one color component and the pixel count to be multiplexed on the image data; outputs the image data to the image forming unit; restores the multiplexed at least one color component and the multiplexed pixel count from the image data read by the reading unit; and replaces the pixels of the pixel count of a color component corresponding to the at least one color component included in the image data and restored from the image data.