I'm trying to get a image from a web view, but, when I call the "webView.capturePicture()" it bring me a Picture Object. In most cases this is enough to me use the follow code to convert it to a bitmap object
Bitmap b = Bitmap.createBitmap(picture.getWidth(), picture.getHeight(), Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
picture.draw(c);
But in same cases the Bitmap that will be created is largest than the android supports on memory.
So, I need to know how to convert the Picture object to bitmap Object directly in a File (I guess that would be a solution) without any instance of Bitmap in Memory. Or same like that. The main point is create a bitmap from the picture object, but I can't because it's too large.
PS: I don't want to use ' android:largeHeap="true" '.
So if someone have same idea let me know.
Thanks