Skip to content

yduf/dhash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Difference Hash computation

Licensed under the GNU General Public License, version 3. (GPLv3)

Based on idea from article / 2

Behavior

  • try to keep aspect ratio when computing hash
  • use one of these 3 ratio that fit into 64bits: 8x8, 9x7, 10x6
  • rotate image by 90 when needed, to always fit into these ratios.
  • use libvips thumbnail for fast reduction
  • image formats are those supported by libvips
  • output results a one line json for easier script integration

Compiling

Install dependencies:

meson build .
cd build
meson compile

Usage

$ dhash ~/Pictures/*.webp
{"file":"/home/yves/Pictures/6ihqil3250u91.webp","hash":4413131122559126504,"height":7,"rot90":1,"width":9}

About

Fast perceptual image hash

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published