如何从设备屏幕中的html创建位图?
我尝试了这个,但它给了我一个黑色图像输出
Webview mAppView = this.webView;
float appScale = mAppView.getScale();
int scaledViewHeight = (int)(webViewHeight * appScale);
int scaledViewWidth = (int)(webViewWidth * appScale);
bmp = Bitmap.createBitmap(scaledViewWidth, scaledViewHeight, Bitmap.Config.RGB_565);
try {
os = new FileOutputStream(Environment.getExternalStorageDirectory()+"/DCIM/Camera/" + "canvas.png");
bmp.compress(CompressFormat.PNG, 90, os);
} catch(IOException e) {
Log.v("save image", "fail");
}