Skip to content

MagicYH/PHash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

PHash

Perceptual hash implementation for PHP

Support

  • Average hash
  • DCT hash

Need

  • Imagick

Example usage

$hashString1 = ImageHash::getHashByFile("test1.png", 'dhash');
$hash1 = ImageHash::conver2Int($hashString1);

$hashString2 = ImageHash::getHashByFile("test2.png", 'dhash');
$hash2 = ImageHash::conver2Int($hashString2);

$dis = ImageHash::getDistanceInt($hash1, $hash2);
echo "$dis\n";

$dis = ImageHash::getDistance($hashString1, $hashString2);
echo "$dis\n";

echo "$hashString1, $hashString2\n";

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages