There's no need to do all that, simply parse the file's contents out, byte for byte, and generate a hash, then compare hashes. Of course merely changing a pixel or adding some header information would **** you over, but whatever.
Alternatively, you could sample a certain coordinates for the head, like where it faces down, and store the RGBA values with a threshold to permit. Then compare a few pixels aganist each other, only 32x32x3 bytes to parse if you do them all anyway, wouldn't take that long.