1: How do you verify an image really does conform?
2: How are people creating these images? Obviously not by hand, with 16,777,216 individually coloured pixels involved.
2²⁴ isn't too terribly large, so there's a few possible validations: iterate and set bitflags for each color already seen, sort the pixels and check for duplicates, ...