Created
June 25, 2015 16:36
-
-
Save shoaibi/f6d258f93933ea63b425 to your computer and use it in GitHub Desktop.
Compare 2 images using Imagick in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment