title: Convert PSD with custom channels to JPG
body: <h2>Situation</h2>
  
  <p>I have a large number of PSD files (~10,000) and wish to create jpegs of all of them without a gui.</p>
  
  <h2>Restrictions</h2>
  
  <p>The conversion process needs to (eventually) happen on a headless linux/osx box and so must run from command line.
  I'm running OSX/Linux environments so the solution needs to run on either(or both) of them</p>
  
  <h2>Previous Attempts</h2>
  
  <p>For some of the files, (the more recent ones) the convert command:</p>
  
  <p><code>
  convert -flatten input.psd output.jpg
  </code>
  works fine.</p>
  
  <p>For some of them, (those with previews/compatibility mode)</p>
  
  <p><code>
  convert input.psd[0] output.jpg
  </code>
  Also works fine.</p>
  
  <p>However, when I attempt to convert from an 8bits/channel multichannel design, the convert command gives a really wacky output. I assume it's trying to use RGB but obviously that's not right!</p>
  
  <p>Is there any way/tool I can use to generate a jpeg from these multichannel PSDs?
  In fact, even some way to recognise that this is a non-standard PSD would be a great help as I could then treat them differently (ship off to another machine for more processing etc)</p>
  
  <p>To see an example:</p>
  
  <p><img src="https://dl.dropbox.com/u/5718548/Screen%20Shot%202012-06-04%20at%2000.04.32.png" alt="Right">
  <img src="https://dl.dropbox.com/u/5718548/Screen%20Shot%202012-06-04%20at%2000.04.52.png" alt="Wrong"></p>
  
  <p><img src="https://dl.dropbox.com/u/5718548/Screen%20Shot%202012-06-04%20at%2000.08.17.png" alt="Menu">
  <img src="https://dl.dropbox.com/u/5718548/Screen%20Shot%202012-06-04%20at%2000.08.41.png" alt="Channels"></p>