Creating bitmap from webView / Cordova

I have a page loaded in webview / Cordova.
Is it possible to get the bitmap of an image loaded in this webview with id / class XYZ?

I know it is possible to pass an image url in java and load the image there and create a bitmap from it. But in this case, the image must be loaded again.


source to share

2 answers

Finally, I got a workaround for this problem.
It has 3 steps

1.convert image in Webview to base64String
 ( This link will help you with that.)

2.Pass base64String to java using cordbridge.

3.Decode base64string in java to create bitmap
( This link will help you do that.)



android 2.3 can get image_file from cache, 4.0+, useless



All Articles