1
A
回答
5
总之,你得到的位图ROM绘图缓存:
v1.setDrawingCacheEnabled(true);
bitmap = Bitmap.createBitmap(v1.getDrawingCache());
这里还有几个问题的答案显示全码:
这些都是View类的方法,使它们适用于任何衍生的一种(包括ImageView的)
0
你可以这段代码举行位图对象的背景:
Matrix matrix = new Matrix();
matrix.postScale(scaledWidth, scaledHeight);
Bitmap resizedBitmap = Bitmap.createBitmap(originalBitmap, 0, 0,
originalBitmap.width(), originalBitmap.height(), matrix, true);
并保存后使用此代码:
OutputStream fOut = null;
File file = new File(strDirectoy,imgname);
fOut = new FileOutputStream(file);
resizedBitmap.compress(Bitmap.CompressFormat.PNG, 0, fOut);
fOut.flush();
fOut.close();
相关问题
- 1. 如何在Android中保存图像?
- 2. 在android中捕获的图像保存
- 3. 在Android阅读器中保存图像
- 4. 将图像保存在HashMap中Android
- 5. 保存图像android sqlite
- 6. 保存图像,webview,android
- 7. Android保存bmp图像
- 8. zooming android image关于图像中心
- 9. 在android中保存图像时获取图像路径
- 10. 试图使用与IBM Watson Image Recon保存在Firebase中的图像
- 11. Android应用程序在图库中保存和存储图像?
- 12. 在UITableViewCell中保存图像
- 13. 在iOS中保存图像
- 14. 在matlab中保存图像
- 15. Android - 保存图像中的噪点
- 16. 在Android中保存位图
- 17. On Image Drawing保存
- 18. 使用Image Resizer保护图像ASP.NET MVC
- 19. Android图库视图与保存在sqlite中的图像blob
- 20. 在Android中保存画布在图像上绘图
- 21. android - 将图像保存到图库
- 22. 从Android处理草图保存图像
- 23. 如何将“ContentType = {image/jpeg}”的响应保存为图像C#?
- 24. 将图像保存在Azure存储中
- 25. 如何在Android中将图像保存到图库?
- 26. 保存图像
- 27. 保存图像
- 28. 保存图像
- 29. 保存图像
- 30. 从MATLAB中保存图像的图像
+1:我想从imageview的提取图像。适合我的作品! Thnx @Aleadam。 – 2013-06-11 13:47:39