Each image is decoded, downscaled to a small thumbnail, and reduced to a perceptual hash using a double-gradient algorithm — it records the direction of brightness changes across the image rather than the pixel values themselves. That is what makes it survive resizing and re-encoding: a JPEG saved at a different quality has completely different bytes but almost the same gradient structure.
Two hashes are compared by Hamming distance, the count of differing bits. The strictness slider maps to a maximum allowed distance, so tightening it narrows what counts as a match. Grouping is a single greedy pass, and for the space-saved arithmetic the largest file in a group is treated as the one you would keep.
On precision, an honest note. The similarity percentage shown is derived from an assumed hash width that is wider than the hash the configured algorithm actually produces. The practical consequence, which the source documents against itself, is that the percentages read optimistically and the effective threshold is looser than the slider suggests — a setting of 85% admits pairs down to roughly 77.5% by the intended scale. This does not make the matching wrong, and it does not affect exact matching at all, but it does mean you should treat the number as a relative dial rather than a calibrated measurement. Tighten it if a group looks too permissive.
Rotation and flip handling. With rotation matching enabled, which is the default, all eight dihedral orientations of an image are hashed and the smallest distance to the other image's canonical hash is used. This catches copies that were rotated destructively. It costs extra hashing, and because only the canonical hash is cached, rotation mode bypasses the cache — a deliberate trade of speed for coverage.
Decoding is treated as untrusted. Image format is determined by sniffing content rather than believing the extension, and decoding runs under explicit dimension and allocation limits so a malformed or maliciously crafted image cannot exhaust memory. A file that fails to decode is skipped and recorded, not fatal.
What is not claimed. There is no crop-specific handling in the engine. A heavily cropped copy changes the gradient structure across the frame, and whether it still matches depends entirely on how much was removed — so treat crop tolerance as unverified rather than a feature. Comparison view is images only; there is no side-by-side preview for video or audio.