title: Convert PNG with transparency to JPG
body: <blockquote>
    <p><strong>Edit:</strong> The original title of this question was <strong>"Drawbacks of using <code>-flatten</code> option"</strong>. However, after this question was answered, I decided to change its title, to make it easier found on Google. Also, new title is actually better describes what is told below.</p>
  </blockquote>
  
  <p>As I discovered today, to convert PNG with transparency into JPG, we need to use <code>-flatten</code> option.</p>
  
  <p>Try it yourself: download <a href="https://www.google.ru/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" rel="nofollow noreferrer">Google logo</a> and convert it from PNG to JPG with the following line</p>
  
  <pre><code>convert google.png google.jpg
  </code></pre>
  
  <p>the picture will be messed:</p>
  
  <p><a href="https://i.stack.imgur.com/w3VpT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w3VpT.jpg" alt="enter image description here"></a></p>
  
  <p>With <code>-flatten</code> option, it works fine:</p>
  
  <pre><code>convert google.png -flatten google.jpg
  </code></pre>
  
  <p>I'm wondering are there any drawbacks of using <code>-flatten</code> permanently, for all conversions between PNG, JPG/JPEG and GIF.</p>