| How about creating your own Pixel object that implements Comparable? Define equals() and compareTo(), and then shove them into a Set of some sort (doesn't really matter which type). A Set will ignore duplicates, so all of the elements will be unique. |