title: Error Level Analysis with Imagick PHP - result without color
body: <p>yesterday I posted about a problem with recreating an Error Level Analysis in PHP with Imagmagick. In this question I <a href="https://stackoverflow.com/questions/51584742/error-level-analysis-with-php">found a solution</a> with the command-line interaction and tried to translate it into Imagick and PHP.</p>
  <p>The following code was proposed:</p>
  <pre><code>convert barn.jpg \( +clone -quality 95 \) -compose difference -composite -auto-level -gamma 1.5 barn_ela.png
  </code></pre>
  <p>In this example, the result should highlight the manipulated parts of the image. So I implemented the following code:</p>
  <pre><code>            $ELAImageMagick = new Imagick($targetDir . $OriginalImage);
              $OriginalImageMagick = new Imagick($targetDir . $OriginalImage);
  
              $ELAImageMagick-&gt;setImageCompression(Imagick::COMPRESSION_JPEG);
              $ELAImageMagick-&gt;setImageCompressionQuality($this-&gt;getRequest()-&gt;postVar('elaQuality'));
  
              $ELAImageMagick-&gt;compositeImage($OriginalImageMagick, Imagick::COMPOSITE_DIFFERENCE, 1,1);
  
              $ELAImageMagick-&gt;autoLevelImage();
  
              //Set gamma with a slider in the frontend
              $ELAImageMagick-&gt;gammaImage($this-&gt;getRequest()-&gt;postVar('elaSize'));
  
              //save ELA-image into Folder
              $ELAImageMagick-&gt;writeImage($targetDir . $ELAImage);
  </code></pre>
  <p>Unfortunatly the result does not come close to the desired optic of the result:</p>
  <p><a href="https://i.stack.imgur.com/CTy4E.jpg" rel="nofollow noreferrer">The original image (yellow bird has been added in photoshop)</a></p>
  <p><a href="https://i.stack.imgur.com/3Pmnr.jpg" rel="nofollow noreferrer">The ELA-Result</a></p>
  <p>Does anyone have an idea, what step I didn't catch quite right and how to solve it? I looked into the documentation and didn't really find any alternatives to this.</p>
  <p>Thanks in advance!</p>