title: imagick / php - check the differences between the pictures and the determination of changes
body: <p>I have two images (first and second link).</p>
  
  <p><a href="http://s4.postimg.org/6n8ttc3j1/image.jpg" rel="nofollow">First image</a></p>
  
  <p><a href="http://s28.postimg.org/o6ihmflv1/image.jpg" rel="nofollow">Second image</a></p>
  
  <p><a href="http://s1.postimg.org/4m2xuy59b/image.jpg" rel="nofollow">Third image</a></p>
  
  <p>Third image was generated by imagick, by code:</p>
  
  <pre><code>$image1 = new \imagick(dirname(dirname(dirname(__DIR__))) . "/1.jpg");
  $image2 = new \imagick(dirname(dirname(dirname(__DIR__))) . "/2.jpg");
  
  $result = $image1-&gt;compareImages($image2, \Imagick::METRIC_MEANSQUAREERROR);
  $result[0]-&gt;setImageFormat("jpg");
  
  header("Content-Type: image/jpeg");
  echo $result[0];
  exit();
  </code></pre>
  
  <p>Can I indicate changes in a different way? For example, differences marked red frame.</p>