Android Camera Set Resolution

前端 未结 2 371
既然无缘
既然无缘 2020-12-14 22:29

I have built a custom Camera App and I am trying to change the resoloution of the image that is took. I have read around that this could depend on the phone or version of An

2条回答
  •  粉色の甜心
    2020-12-14 22:48

    There is no setResolution(), only setPictureSize(). Use getSupportedPictureSizes() on Camera.Parameters to find the size you want, or use that information to populate a ListView or Spinner or something for the user to choose the desired size. Here is a sample project recently updated to use getSupportedPictureSizes() to find the smallest supported resolution and use that.

提交回复
热议问题