title: read pixel value from png android
body: <p>I am reading png to extract pixel RGB by using the following code </p>
  
  <pre><code>String filePath="map.png";
  
  InputStream instream;
  
  
  try {
          instream = assetManager.open(filePath);
          bMap = BitmapFactory.decodeStream(istr);
  
  
  } catch (IOException e) {
        // handle exception
  }   
  </code></pre>
  
  <p>The code works fine but when png is converted into BitMap, the bmap object size is too large (png=700kb , bmap=30MB+), thus, application crashes.   </p>
  
  <p>Is there a way to avoid loading png as BitmapFactory and still extract pixel RGB. </p>
  
  <p>Thanks for the help. </p>