1. A computer-implemented spam filtering method comprising employing a computer system to perform the steps of: generating a query histogram representation of an image forming at least part of an electronic communication; determining a histogram distance between the query histogram representation and a reference histogram representation, wherein determining the histogram distance comprises comparing a first bin of a first histogram representation to a range of second bins of a second histogram representation to determine a similarity between the first bin and the range of second bins, wherein the first histogram representation and the second histogram representation are selected from the query histogram representation and the reference histogram representation, and wherein the first histogram representation is distinct from the second histogram representation, and employing the similarity between the first bin and the range of second bins to determine the histogram distance between the query histogram representation and the reference histogram representation; and making a determination whether the electronic communication is spam or non-spam according to the histogram distance.