Using PHP, how can I check whether an image exists within another?
Example:
How can I check whether subimage.jpg exists within mainimage.jpg, using PHP?
Using PHP, how can I check whether an image exists within another?
Example:
How can I check whether subimage.jpg exists within mainimage.jpg, using PHP?
The Imagick class , Check this link
Using Imagick::compareImages() to Compare images and display the reconstructed image .
<?php
$image1 = new imagick("image1.png");
$image2 = new imagick("image2.png");
$result = $image1->compareImages($image2, Imagick::METRIC_MEANSQUAREERROR);
$result[0]->setImageFormat("png");
header("Content-Type: image/png");
echo $result[0];
?>
Try this
$img1 = md5(file_get_contents($img1));
$img2 = md5(file_get_contents($img2));
And compare both