开发者

Android camera exposure

开发者 https://www.devze.com 2023-02-13 12:08 出处:网络
I am facing issues with getExposureCompensation() and getExposureCompensationStep() apis. Whenever I call these two apis, it

I am facing issues with getExposureCompensation() and getExposureCompensationStep() apis. Whenever I call these two apis, it throws a null pointer exception. When i use the getExposureCompensation after using setExposureCompensation() api, then it work开发者_Python百科s fine. But in the case of getExposureCompensationStep(), i dont have a choice.

Your opinion and suggestion in this matter will be appreciated.

Thanks Nawab


EDIT: There's your problem. :) Or not... >.>

Camera does not have a getExposureCompensation() or getExposureCompensationStep() method. Those are methods for your Camera.Parameters object! Try changing it to:

int expcomp = params.getExposureCompensation();
float expstep = params.getExposureCompensationStep();
0

精彩评论

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