title: Android resizing large image recieved as base64 string
body: <p>i have some issue resizing an image in android.
  i have a base64 string (i don't have a file or a url, just the string) and so far i get a out of memory exception as soon as i try to decode it. </p>
  
  <pre><code>public String resizeBase64Image(String base64image){
  
      byte [] encodeByte=Base64.decode(base64image,Base64.DEFAULT); //out of memory exception...
  
      BitmapFactory.Options options=new BitmapFactory.Options();
      options.inPurgeable = true;
      Bitmap image = BitmapFactory.decodeByteArray(encodeByte, 0, encodeByte.length,options);
  
      image = Bitmap.createScaledBitmap(image, IMG_WIDTH, IMG_HEIGHT, false);
  
      ByteArrayOutputStream baos=new  ByteArrayOutputStream();
      image.compress(Bitmap.CompressFormat.PNG,100, baos);
      byte [] newbytes=baos.toByteArray();
  
      return Base64.encodeToString(newbytes, Base64.DEFAULT);
  
  }
  </code></pre>
  
  <p>Does anybody have an idea?</p>