title: How to keep image quality same in BitmapFactory
body: <p>I've converted an bitmap image into string to save it:</p>
  
  <pre><code>............
  Bitmap photo = extras.getParcelable("data");
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  photo.compress(Bitmap.CompressFormat.JPEG, 100, baos);
  byte[] b = baos.toByteArray();
  String encodedImage = Base64.encodeToString(b, Base64.DEFAULT);
  </code></pre>
  
  <p>Then I retrieve the bitmap from string to set an activity's background just like that:</p>
  
  <pre><code>byte[] temp = Base64.decode(encodedImage, Base64.DEFAULT);
  Options options = new BitmapFactory.Options();
  options.inScaled = false;
  Bitmap bitmap = BitmapFactory.decodeByteArray(temp, 0,
                  temp.length, options);
  Drawable d = new BitmapDrawable(getResources(), bitmap);
  getWindow().setBackgroundDrawable(d);
  </code></pre>
  
  <p>Everything works fine but the image quality reduces tremendously. How can I keep the image quality same as the original image? Did I do something wrong here that have reduced the quality?</p>