I currently create a hash from an image name but would rather create a hash based on the contents of an image so I can detect duplicate images. Are their any PHP classes that do this?
My current code is very simple:
$image = "image1.jpg";
$filehash = md5_file($image );
The current code you have is actually calculating the md5 of the file contents. What you already have does what you want.