开发者

how to increase camera resolution when using IMAGE_CAPTURE intent

I run my android application with camera functionality implemented in an android-powered phone, but the camera image I got always has small resolution. It seems by default, the android camera resolution is s开发者_如何学运维mall (e.g. 640*480), how to increase the resolution??

I use the following code to implement the camera part:

Intent i = new Intent("android.media.action.IMAGE_CAPTURE"); 
File photo=new File(Environment.getExternalStorageDirectory(), "123.jpg"); 
i.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photo)); 
startActivityForResult(i, 1); 

any suggestions on this???


Didn't tried it myself, but you could try to add the EXTRA_VIDEO_OUTPUT extra in the intent.

Just add:

i.putExtra(MediaStore.EXTRA_VIDEO_OUTPUT, 1);

See the reference for further information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜