Computes the SHA-256 of the file and of its decoded pixels, and the
difference hash (dHash) and perceptual hash (pHash) of the image in eight
orientations, as specified in the package's ALGORITHMS.md.
Usage
ri_fingerprint(path, name = basename(path))Value
A list with name, file_sha256, pixel_sha256, width,
height, dhash, phash, format, bit_depth and variants (the
hashes of every orientation).
Examples
f <- file.path(ri_example_dir(), "gel_a.png")
fp <- ri_fingerprint(f)
fp[c("name", "width", "height", "dhash", "phash")]
#> $name
#> [1] "gel_a.png"
#>
#> $width
#> [1] 128
#>
#> $height
#> [1] 128
#>
#> $dhash
#> [1] "eedcfc243aa84343"
#>
#> $phash
#> [1] "8611c1f8feee9129"
#>