通过MediaStore.ACTION_IMAGE_CAPTURE拍摄照片 - 指定影像大小 [英] android taking picture by MediaStore.ACTION_IMAGE_CAPTURE - specifying image size

查看:1257
本文介绍了通过MediaStore.ACTION_IMAGE_CAPTURE拍摄照片 - 指定影像大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用MediaStore.ACTION_IMAGE_CAPTURE意图并以此意图启动活动时,是否可以通过Intent目标图像大小传递到相机?
或者我必须手动调整所拍照片的大小?

Is is possible to pass via Intent target image size to camera when using MediaStore.ACTION_IMAGE_CAPTURE Intent and starting activity with this intent? Or do I have to manually resize the taken photo image?

推荐答案

这个意图只有一个额外的参数这是与具有大小,质量等的video_capture意图相比的extra_output(其中将存储图像的位置)。所以不可能。

There is only one extra parameter with this intent which is extra_output (where the image will be stored) as compared to the video_capture intent which has size, quality etc. So not possible.

另一方面,您可以使用相机类来捕获照片,从而可以更好地控制相机及其设置,但需要更多的工作来实现。有一个很好的教程,关于它在Android开发者网站上的使用。

On the other hand you can use the camera class instead to capture the photo which gives you much greater control over camera and its settings but requires more work to implement. There is a good tutorial about its use on the android developer website.

这篇关于通过MediaStore.ACTION_IMAGE_CAPTURE拍摄照片 - 指定影像大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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