This invention has as its object to efficiently encode an image. To this
end, for example, an image undergoes a color reduction process using a
dither matrix with a predetermined size. A print control command is
output. A compression parameter designation command that designates an up
copy vertical offset value (a value according to the matrix size), a near
left copy horizontal offset value (a value according to the matrix size),
and a far left copy horizontal offset value (a value according to the
period of background patterns), which are used in encoding, is output.
Image data is encoded according to an encoding sequence.