title: Capture result of ImageMagick compare to a variable
body: <p>I am using a software called ImageMagick, that has command line inputs to do photo comparisons and output a value.
  I want to save that output value to a specific variable for further analysis. 
  How would I do that?
  Here is the command I would run in command line:</p>
  
  <pre><code>compare -metric MSE Picture1.jpg Picture2.jpg difference.png
  </code></pre>
  
  <p>This will compare the pixel differences between picture 1 and picture 2. Save it as difference and output a number of the difference. If identical it will be 0.
  I want to be able to capture that value in terms of a variable.</p>