In embedding a dot pattern in an image, use of a dot pattern component that mainly
aims at suppressing any degradation in image quality sacrifices accurate information
detection. Conversely, use of a component that aims at improving the detection
accuracy largely degrades the image quality. Error diffusion is executed for an
image, a component of a dot pattern to be embedded is determined on the basis of
the image that has undergone error diffusion, and the dot pattern is embedded in
the image that has undergone error diffusion using the determined component.