title: Prevent ImageMagick from using indexed colors?
body: <p>I have some PNG images with transparency. However, whenever I do any operations with ImageMagick on the image (e.g. cropping), it changes some of the images to be "indexed" color instead of RGB. The images that change are ones where there happens to be fewer than 256 colors, but the conversion ruins the transparency.</p>
  
  <p>From some research I found you can prepend a filename with <code>png32:</code> to force RGB, but that only works when using the <code>convert</code> command, not <code>mogrify</code>.</p>
  
  <p>I can add <code>-format png32</code> with mogrify, but that renames all the images to <code>*.png32</code>.</p>
  
  <p>Supposedly you can do this:</p>
  
  <pre><code>mogrify -define png:format=png32 -format png *.png
  </code></pre>
  
  <p>But it doesn't work, the images are still indexed color not RGB. How do I force PNG32 with mogrify?</p>