-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp_imagehash.stub.php
More file actions
107 lines (89 loc) · 2.27 KB
/
Copy pathphp_imagehash.stub.php
File metadata and controls
107 lines (89 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
// Stubs for php_imagehash
namespace {
class ImageHashIndex {
public function __construct() {}
/**
* @param string $id
* @param string $hash
* @return bool
*/
public function add(string $id, string $hash): bool {}
/**
* @param string $id
* @param string $path
* @return bool
*/
public function addImage(string $id, string $path): bool {}
/**
* @return void
*/
public function clear(): void {}
/**
* @return int
*/
public function count(): int {}
/**
* @param string $path
* @return bool
*/
public function loadFromFile(string $path): bool {}
/**
* @param string $hash
* @return array
*/
public function nearest(string $hash): array {}
/**
* @param string $path
* @return array
*/
public function nearestImage(string $path): array {}
/**
* @return void
*/
public function rebuildBuckets(): void {}
/**
* @param string $path
* @return bool
*/
public function save(string $path): bool {}
/**
* @param string $hash
* @param int $max_distance
* @param int $limit
* @return array
*/
public function search(string $hash, int $max_distance, int $limit): array {}
/**
* @param string $path
* @param int $max_distance
* @param int $limit
* @return array
*/
public function searchImage(string $path, int $max_distance, int $limit): array {}
/**
* @return array
*/
public function stats(): array {}
}
/**
* @param string $a
* @param string $b
* @return int
*/
function hamming_distance(string $a, string $b): int {}
/**
* @param string $path
* @return string
*/
function image_dhash(string $path): string {}
/**
* @param string $path
* @return string
*/
function image_phash(string $path): string {}
/**
* @return string
*/
function imagehash_version(): string {}
}