dhash
Implementation of Neal Krawetz’s dHash algorithm in Nim
Summary
| Latest Version | 2.1.1 |
|---|---|
| License | LGPL-3.0-or-later |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:25 |
Tags
Authors
- Filip Vybihal
Installation
nimble install dhash
choosenim install dhash
git clone https://github.com/filvyb/dhash
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| dhash | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.6.0 | No |
| imageman >= | 0.8.2 | No |
| argparse >= | 4.0.1 | No |
| bigints#head | - | No |
Source
| Repository | https://github.com/filvyb/dhash |
|---|---|
| Homepage | https://github.com/filvyb/dhash |
| Registry Source | nimble_official |
README
dhash
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
Usage
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