Closed zvezdochiot closed 4 years ago
The use-case of findimagedupes is finding similar images (which may include identical images which differ only by resolution), so limiting the program to a particular x-y resolution is out of scope.
You can partition your images yourself and then run findimagedupes on each batch separately. For example, in bash you could do something like:
# create a directory to store the lists of files
workdir=$(mktemp -d)
# get and store dimensions of images
find [...images/directories...] -type f -exec gm identify -format '%wx%h %f' '{}' \; 2>&- |\
while read -r dim file; do
echo "$file" >> "$workdir/$dim"
done
# run findimagedupes on each batch
find "$workdir" -type f -exec bash -c 'findimagedupes [...optons...] < {}' \;
# tidy up
rm -r "$workdir"
This sort of filtering will be simpler if/when I reimplement the fingerprint database using sqlite.
For some tasks need to search for similar images with only the same size. Is such an optional modification possible? That is, to compare not the strings
phash
, but the strings(Width)x(Height):phash
?