title: ImageMagick: Transparent Backgrounds for JPEG, not PNG
body: <p>I'm using ImageMagick to convert PDF files to PNGs.  (Lots of text, so I'd rather use PNG over JPEG.)  I'm doing this on OS X, 10.8.2.  </p>
  
  <p>I tried using Ghostscript, then ImageMagick, as was done <strong><a href="https://stackoverflow.com/a/3379649/701410">here</a></strong> and I got a gray background.  I shortened it to one line, since ImageMagick can work with PDFs and tried this:</p>
  
  <pre><code> convert -background transparent -transparent white \
            Background-Page01.pdf TestClearX1.png
  </code></pre>
  
  <p>I've tried that with PNG files and JPEG files.  (And with and without <code>-transparent white</code> as well.)</p>
  
  <p>If it's a JPEG, I can get a white background (which is probably clear, but in my viewer, I can't tell), but with a PNG, I always get a dark background.  I thought about, as a test, trying to generate a BMP, then converting that to PNG, but it won't generate BMP files.</p>
  
  <p>How can I get a transparent background for a PNG file?</p>
  
  <p>And if that's not possible, since JPEG files are not good for text, is there a better alternative?</p>