android 图标保存,android-如何将图片保存到文件?

我正在尝试使用将要拍照的标准Intent,然后允许批准或重拍.然后,我想将图片保存到文件中.

这是我正在使用的意图:

Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE );

startActivityForResult( intent, 22 );

The caller may pass an extra EXTRA_OUTPUT to control where this

image will be written. If the EXTRA_OUTPUT is not present, then a

small sized image is returned as a Bitmap object in the extra field. If

the EXTRA_OUTPUT is present, then the full-sized image will be

written to the Uri value of EXTRA_OUTPUT.

我没有传递额外的输出,我希望在传递给onActivityResult()的Intent的额外字段中获得一个Bitmap对象(针对此请求).那么,您在哪里/如何提取呢? Intent有一个getExtras(),但是它返回一个Bundle,而Bundle想要一个键串来给你一些东西.

您在提取位图的意图上调用了什么?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值