在ACTION_IM​​AGE_CAPTURE较低的分辨率打开Android相机较低、分辨率、相机、ACTION_IM

2023-09-05 00:05:01 作者:独宠于你

我打开Android摄像头使用的意图是这样的:

I am opening android camera using intent like this :

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

    cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, mCapturedImageURI);  
    startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);

不过相机始终打开6MP分辨率(我认为它的设备的最大拍照分辨率)我想打开它像200万像素的分辨率较低。反正有没有做到这一点。

But camera always opens 6mp resolution (i think its devices max camera resolution) i want to open it lower resolution like 2mp. Is there anyway to do this

感谢您的任何建议。

推荐答案

不幸的是,没有办法,你可以做到这一点。一旦不同的应用程序被lauched该应用程序的设置,仅可以使用该应用程序的用户改变。

Unfortunately there is no way you can do this. Once a different application is lauched the settings of that app can only be changed by the user using the application.

这将是灾难性的,以允许其他应用程序来改变应用程序的设置。

It would be disastrous to allow other apps to change the settings of an app.

所以,你有两个选择,现在 -

So you have two options now -

构建你自己的相机活动,并采取所需的分辨率的图片 在告诉用户拍照只在您specidy分辨率,基本上都是要求用户改变相机的分辨率要在相机应用程序之一,他拍照之前..