What is the best way to check if an image is unique using PHP? Say I have a directory of about 30 images (about 500*500 pixels), and someone uploads another picture, what is a good way to check if the uploaded image is not yet in the directory?
Is there some sort of way to create hash's of images which can be easily compared? I then could save the hash's of the images in the directory and compare those to the hash of the uploaded image.
Computing power is not much of an issue, it doesn't have to be able to handle more then a few pictures per minute. Nor is the fact that images with one pixel difference will be seen as different images. The system should just be able to filter out images that are excactly the same.