OutOfMemoryError: bitmap size exceeds VM budget (Convert Drawable to Bitmap)
<p>I have out of memory error when i am trying to convert drawable in to Bitmap images. I have past my code and stack trace if its possible plz help.</p>

<pre><code>public static Bitmap convertDrawableToBitmap(Drawable dwb, int width, int height){
        if (dwb == null || width == 0 || height == 0)
            return null;
        Bitmap bmp = Bitmap.createBitmap(width, height, Config.ARGB_8888); //line 23
        Canvas canvas = new Canvas(bmp); 
        dwb.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
        dwb.draw(canvas);
        return bmp;
    }

//---------------

va.lang.OutOfMemoryError: bitmap size exceeds VM budget
1at android.graphics.Bitmap.nativeCreate(Native Method)
2at android.graphics.Bitmap.createBitmap(Bitmap.java:477)
3at com.app.downloadmanager.utils.DrawableBitmapUtils.convertDrawableToBitmap(DrawableBitmapUtils.java:23)
</code></pre>
