mirror of
https://github.com/simon987/fastimagehash-go.git
synced 2025-12-14 22:59:02 +00:00
Update fastimagehash.go
This commit is contained in:
@@ -16,13 +16,13 @@ import (
|
|||||||
const char* Version = FASTIMAGEHASH_VERSION;
|
const char* Version = FASTIMAGEHASH_VERSION;
|
||||||
|
|
||||||
char *hash_to_hex_string_reversed_wr(void *h, int size) {
|
char *hash_to_hex_string_reversed_wr(void *h, int size) {
|
||||||
char *out = malloc(size * 2 + 1);
|
char *out = malloc(size * size / 4 + 1);
|
||||||
hash_to_hex_string_reversed((uchar*)h, out, size);
|
hash_to_hex_string_reversed((uchar*)h, out, size);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *hash_to_hex_string_wr(void *h, int size) {
|
char *hash_to_hex_string_wr(void *h, int size) {
|
||||||
char *out = malloc(size * 2 + 1);
|
char *out = malloc(size * size / 4 + 1);
|
||||||
hash_to_hex_string((uchar*)h, out, size);
|
hash_to_hex_string((uchar*)h, out, size);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user