tioga-tours / php-imgfing
Check images on their unique fingerprint and compare them
Installs: 4 897
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 1
Requires
- php: >=7.4
- ext-gd: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.16
- phploc/phploc: ~7.0
- phpmd/phpmd: ~2.9
- phpunit/phpunit: ^9.0
- sebastian/phpcpd: ~6.0
- squizlabs/php_codesniffer: ~3.3
Suggests
- ext-imagick: *
This package is not auto-updated.
Last update: 2025-04-03 04:31:35 UTC
README
Create fingerprints of images to quickly find duplicates or very similar images. Uses GD or Imagick.
Options
bitSize Bit size of the fingerprint, multiple of 3, defaults to 300. Means the number of characters
avgColor Apply a correction based on the diff with the avg color, defaults to 5, the normal avg color is 127. With 5, the average can be adjusted between 122 and 132
adapters Which adapters to use in this order. Defaults to ['Imagick', 'GD']
Usage
<?php
$imgFing = new ImgFing([]);
$f1 = $imgFing->identifyFile(__DIR__ . '/file.png');
$f2 = $imgFing->identifyString(file_get_contents($uri));
echo $imgFing->matchScore($f1, $f2);