要保存图像的ImageView的android系统 [英] To save image from imageView in android

查看:109
本文介绍了要保存图像的ImageView的android系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在图像查看图像,我想保存的图像查看图像画廊或任何存储空间,谁能告诉我如何做到这一点??? 谢谢你。

最好的问候

解决方案

总之,你得到的位图ROM绘图缓存:

  v1.setDrawingCacheEnabled(真正的);
位图= Bitmap.createBitmap(v1.getDrawingCache());
 

有几个问题在这里的答案显示全code:

这些都是View类的方法,因此它们是适用于任何衍生的一种(包括ImageView的)

I have an image in image-view and i want to save image from image-view to gallery or any storage space can anyone tell me how to do this??? Thank you.

Best Regards

解决方案

In short, you get the bitmap rom the drawing cache:

v1.setDrawingCacheEnabled(true);
bitmap = Bitmap.createBitmap(v1.getDrawingCache());

There are several questions here with answers showing full code:

These are methods of the View class, so they are applicable to any derived one (including ImageView)

这篇关于要保存图像的ImageView的android系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆