title: OutOfMemoryError: bitmap size exceeds VM budget on loading DICOM images
body: <p>I have the following code which i took from another application</p>
  
  <pre><code>    public static Bitmap createBitMap(DicomObject dcmObj) {
      short[] image = dcmObj.getShorts(Integer.parseInt("7FE00010", 16));
      float wc = dcmObj.getFloat(Integer.parseInt("00281050", 16));
      float ww = dcmObj.getFloat(Integer.parseInt("00281051", 16));
  
      Bitmap bitMap = Bitmap.createBitmap(dcmObj.getInt(Tag.Columns), dcmObj
              .getInt(Tag.Rows), Bitmap.Config.ARGB_8888);
              bitMap.copyPixelsFromBuffer(LocalImport.makeBuffer((localImport
              .applyWindowing(image, wc, ww)), dcmObj.getInt(Tag.Columns),
              dcmObj.getInt(Tag.Rows)));
      return bitMap;
  }
  </code></pre>
  
  <p>What I am trying to do is load few Dicom images from the SD Card read the attributes and display them in a grid.
  The above function works fine with the application but when i integrate the same code to my application it crashes.
  I tried debugging, but the values of the variables are the same.</p>