dhash is a Nim library and CLI program that generates a perceptual hash for a given image based on Neal Krawetz’s blog post on dHash algorithm
As library
import imageman
import bigints
import dhash
let image1 = get_img("path/to/image")
let hash1 = dhash_int(image1)
As a binary
dhash path/to/image