title: Outofmemory error when i display webp image on android 2.x with libwebp and ndk
body: <p>　　I use google open source project libwebp to display webp image on android 1.6--android 4.0,and directly decode webp on android 4.0 or above this version, I found that in some android mobilephones such as appo,I will get an outofmemory error when run libwebp lib,and the code which gives error is:<code>int[] pixels = new int[decoded.length / 4];</code> 
  can anyone suggest me how to avoid this? Here is my code:</p>
  
  <p>　　</p>
  
  <pre><code>public static Bitmap getBitmapFromURL(String src) {        
            HttpURLConnection connection = null;        
            Bitmap bmp = null;        
            try {            
                 connection = (HttpURLConnection) 
                 new URL(src).openConnection();               
                 connection.setRequestMethod("GET");           
                 connection.setUseCaches(false);            
                 connection.setDoInput(true);            
                 connection.setDoOutput(true);           
                 connection.setRequestProperty("Content-Type", 
                     "image/webp");           
                 connection.connect();
            //Send request             
                 DataOutputStream wr = new DataOutputStream (                               connection.getOutputStream ());              
                 wr.writeBytes ("");             
                 wr.flush ();             
                 wr.close ();
                //Get Response                  
                 BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream()));
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              byte[] buf = new byte[4096];           
               while(true) {               
                    String n = rd.readLine();                
                    if(n == null)break;                
                        baos.write(n.getBytes(), 0, n.getByte().length);                     
                    baos.write('\n');            
             }
              byte data[] = baos.toByteArray();                   
   // From the lib's exemple             
              int[] width = new int[] { 0 };           
              int[] height = new int[] { 0 };
              int test = libwebp.WebPGetInfo(data, data.length, width, height); 
  // test = 0 ! ! !
              byte[] decoded = libwebp.WebPDecodeARGB(data, data.length, width, height); 
  
  #######################out of memory error is always here         
              int[] pixels = new int[decoded.length / 4];  
  ####################### 
              ByteBuffer.wrap(decoded).asIntBuffer().get(pixels);
              bmp = Bitmap.createBitmap(pixels, width[0], height[0],Bitmap.Config.ARGB_8888);        
               } catch (IOException e) {           
              e.printStackTrace();        }
          return bmp;
      }
  </code></pre>