1. A method comprising: detecting horizontal and vertical edges of contiguous regions in an image; and determining a probability that the image contains spam, based at least in part on a ratio of a number of the horizontal edges to a number of the vertical edges.