views:

53

answers:

2

Comparing 2 images to see if they are both the same files are easy, threw the files MD5, but is it possible or even plausible to determine if 2 images are same by using PHP GD to get the difference of the two images. If we where to get the difference of the two, and it was all white (id assume white or even black), then we would now know its both the same photo?

Also side note: id like to know if its possible to get 2 images of equal size to create an onion skin effect, 50% transparency on 1 and 50% on the other.

A: 

Not sure whether it is that easy and a solution exits but probably you may get an idea of image detection from:

Face detection with PHP
Image Nudity Filter (Class)

Sarfraz
+1  A: 

Hi Joseph,

ImageMagick offers various tools you can use for this, through the PHP ImageMagick extension.

http://www.php.net/manual/en/function.imagick-compareimages.php

Biggest problem is that the documentation for that library is pretty much non-existing, so there will be a lot of trial-and-error involved.

kander