i'm kinda new here and i have this project where i need to compare 2 images together (i am using php and mysql for this project) and show the difference between them on pixel based , meaning that if there is a slight difference on the image i need to know where is it
i know that we can use the normal imagecolorat option in php but this one only shows the difference in colors and there is no way for it to show the difference in coloring on the new compared image , like the below example:
`
$im = imagecreatefrompng("php.png");
$rgb = imagecolorat($im, 10, 15);
$r = ($rgb >> 16) & 0xFF;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
var_dump($r, $g, $b);
for a more complex solutions there is Imagick and it is better showing the percentage of change in pixels but still i have no clue how to make it show the difference in the pixels on the new compared image , like the below example
$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];
anyone can help on this is much appreciated , and please dont be critical and judgmental