In FIGS. 9A to 9D, a0 is a starting changed pixel on the encoding line, and a1 is a first changed pixel on the right side of a0 on the encoding line. a2 is a changed pixel next to a1 on the encoding line, and b1 is a first changed pixel on the reference line on the right side of a0 and having a color opposite to that of a0. b2 is a changed pixel next to b1 on the reference line