The types of pixels of an image made up of a plurality of pixels arranged
in a first direction and a second direction substantially perpendicular
to the first direction are distinguished. The image is divided into a
plurality of blocks, the number of pixels which are determined to be an
edge pixel in each block is counted, and whether each of pixels in each
block is a halftone pixel is determined on the basis of the number of the
pixels which are determined to be an edge pixel in the block. When a
plurality of pixels continuous in the first direction and/or the second
direction are determined to be edge pixels, the number of edge pixels in
each block is modified by counting as an edge pixel only a predetermined
number of pixels in the set of the pixels consisting of the continuous
pixels which are determined to be an edge pixel, and whether each pixel
in the block is a halftone pixel is determined on the basis of the
modified number of the edge pixels in the block.