Refined the algorithm a bit to make it only consider images as similar if they have roughly the same ratio.
The algorithm works, and this makes SO MUCH EASIER to seek and destroy repeated images without having to export them and using another software.