0

我在 c# 中使用了https://github.com/pgrho/phash 。我想得到像51A70C737AD03A97(16位)这样的哈希值;

但它使 phash 值像:7CFF35758E9E42009DA0839E955B465588816A709063336E8F81639A965D6381A784738995686189(80bit)。

我使用代码:

            var bitmap = (Bitmap)img;
            var hash = ImagePhash.ComputeDigest(bitmap.ToLuminanceImage());
            byte[] bytearr = hash.Coefficients;
            return byteToHexStr(bytearr);

现在,谁知道如何使哈希值只有 16 位,例如51A70C737AD03A97

4

0 回答 0