An image forming apparatus is provided with an image formation portion, a measuring portion and a determination portion. The image formation portion forms an image on an image carrier. The measuring portion measures image formation ability associated with resolution of the image formation portion. The determination portion determines operating condition of the image formation portion according to the measured image formation ability and size of a component image constituting a code pattern image to be formed by the image formation portion. The code pattern image is constituted by a combination of a plurality of the component image having a predetermined shape. The code pattern image is code information expressed as a pattern image.