title: Qt: QImage always saves transparent color as black
body: <p>How do I save a file with transparency to a JPEG file without Qt making the transparent color black?
  I know JPEG doesn't support alpha, and the black is probably just a default "0" value for alpha, but black is a horrible default color.</p>
  
  <p>It seems like this should be a simple operation, but all of the mask and alpha functions I've tried are ignored when saving as JPEG.</p>
  
  <p>For example:</p>
  
  <pre><code>image-&gt;load("someFile.png"); // Has transparent background or alpha channel
  image-&gt;save("somefile.jpg", "JPG"); // Transparent color is black
  </code></pre>
  
  <p>I've tried filling the image with white before saving as a JPEG, converting the image to ARGB32 (with 8-bit alpha channel) before saving, and even tried ridiculously slow stuff like:</p>
  
  <pre><code>QImage image2 = image1-&gt;convertToFormat(QImage::Format_ARGB32);
  image2.setAlphaChannel(image1-&gt;alphaChannel());
  image2.save(fileURI, "JPG", this-&gt;jpgQuality; // Still black!
  
  
  See: http://67.207.149.83/qt_black_transparent.png for a visual.
  </code></pre>