1. An image data coding method comprising the steps of: dividing an image having gray levels into a plurality of blocks, each consisting of a plurality of pixels; detecting a density and the presence/absence of an edge in each block; and encoding an image of each block in accordance with the detected density and the presence/absence of the edge in the image.