title: compress transparent png image to jpg give black background java
body: <p>compress transparent png image to jpg give black background
  I want white background instead of black</p>
  
  <pre><code>public static byte[] getBitMapBytes(Bitmap bmp, int quality) {
     ByteArrayOutputStream stream = new ByteArrayOutputStream();
     bmp.compress(Bitmap.CompressFormat.JPEG, quality, stream);
     byte[] byteArray = stream.toByteArray();
  
     return byteArray;
  }
  fos = new FileOutputStream(f);
  fos.write(getBitMapBytes(compressedImage, 60));
  </code></pre>