fork of the official pHash library, http://www.phash.org/