title: NEF to JPG with ImageMagick
body: <p>I'm using ImageMagick for the first time, I've managed to get all of my dependencies installed and can run convert via Terminal, but I'm having trouble running some commands from PHP.</p>
  
  <p>Here's one that has me totally stumped, this works great in terminal:</p>
  
  <pre><code> convert DSC4741.nef result.jpg
  </code></pre>
  
  <p>But this won't run in PHP:</p>
  
  <pre><code>$im = new Imagick( 'DSC4741.nef' );
  $im-&gt;setImageFormat( 'jpg' );
  $im-&gt;writeImage( 'result.jpg' );
  $im-&gt;clear();
  $im-&gt;destroy();
  </code></pre>
  
  <p>I can convert a jpeg no problem with PHP, but it refuses to do the .NEF.</p>
  
  <p>Here's what I've checked:</p>
  
  <ul>
  <li>The permissions are good on the file (world writeable)</li>
  <li>I can convert a JPG with the exact code</li>
  <li>I changed the extension to lowercase</li>
  <li>Removed the preceding underscore from the file name</li>
  </ul>
  
  <p>Any help would be much appreciated!</p>