Свойство | Тип | Описание | |
---|---|---|---|
$implementation | Jenssegers\ImageHash\Implementation | The hashing implementation. |
Метод | Описание | |
---|---|---|
__construct ( Jenssegers\ImageHash\Implementation $implementation = null, string $mode = self::HEXADECIMAL ) | Constructor. | |
compare ( mixed $resource1, mixed $resource2 ) : integer | Compare 2 images and get the hamming distance. | |
distance ( integer $hash1, integer $hash2 ) : integer | Calculate the Hamming Distance. | |
hash ( mixed $resource ) : integer | Calculate a perceptual hash of an image file. | |
hashFromString ( mixed $data ) : string | Calculate a perceptual hash of an image string. |
Метод | Описание | |
---|---|---|
createResource ( string $data ) : resource | Get a GD2 resource from string. | |
destroyResource ( resource $resource ) | Destroy GD2 resource. | |
formatHash ( integer $hash ) : string | integer | Format hash in hex. | |
loadImageResource ( string $file ) : resource | Get a GD2 resource from file. |
public __construct ( Jenssegers\ImageHash\Implementation $implementation = null, string $mode = self::HEXADECIMAL ) | ||
$implementation | Jenssegers\ImageHash\Implementation | |
$mode | string |
protected createResource ( string $data ) : resource | ||
$data | string | |
Результат | resource |
protected destroyResource ( resource $resource ) | ||
$resource | resource |
public hashFromString ( mixed $data ) : string | ||
$data | mixed | Image data |
Результат | string |
protected loadImageResource ( string $file ) : resource | ||
$file | string | |
Результат | resource |