title: Imagemagick: remove alpha component (replace all intermediate alpha pixel with solid pixel)
body: <p>To solve <a href="https://stackoverflow.com/questions/28469807/android-studio-shows-errorframe-pixels-must-be-either-solid-or-transparent-not">Android build issue</a> I need to replace all intermediate alpha pixel with solid pixel (leaving transparent background as is).</p>
  <p>How to that with ImageMagick or other-command line tool to all images in a tree?</p>
  <p>Image  bg_all_block.9.png</p>
  <p><img src="https://i.stack.imgur.com/kfRXM.png" alt=" bg_all_block.9.png" /></p>
  <p>Image btn_bg_common_press.9.png</p>
  <p><img src="https://i.stack.imgur.com/youaS.png" alt="btn_bg_common_press.9.png" /></p>
  <p><img src="https://i.stack.imgur.com/G6NdP.png" alt="enter image description here" /></p>
  <p>UPDATE: I have found that I can detect if alpha is used, as in <a href="https://stackoverflow.com/questions/2581469/detect-alpha-channel-with-imagemagick">Detect Alpha Channel with ImageMagick</a></p>
  <p>Other found links</p>
  <ul>
  <li><a href="https://graphicdesign.stackexchange.com/questions/16120/batch-replacing-color-with-transparency">https://graphicdesign.stackexchange.com/questions/16120/batch-replacing-color-with-transparency</a></li>
  <li><a href="http://www.imagemagick.org/Usage/color_basics/#replace" rel="noreferrer">http://www.imagemagick.org/Usage/color_basics/#replace</a></li>
  </ul>