Abstract: A reading unit reads image data. A re-reading unit that re-reads the image data read by the reading unit by performing, in a pixel matrix consisting of a plurality of pixels of the image data read by the reading unit, a process of scanning pixels in a partition in which at least two pixels are respectively aligned in a column direction and in a row direction in a predetermined order in a predetermined alignment sequence of partitions. A multivalue run length-encoding unit encodes the image data re-read by the re-reading unit to multivalue run length data indicating at least color data and run lengths of the color data.