Android相机曝光

时间:2011-02-24 20:09:29

标签: android camera

我遇到了getExposureCompensation()和 getExposureCompensationStep()apis。每当我打电话给这两个api时,它 抛出空指针异常。当我使用 使用setExposureCompensation()api后的getExposureCompensation, 然后它工作正常。但是在getExposureCompensationStep()的情况下, 我别无选择。

您对此事的意见和建议表示赞赏。

由于 纳瓦布

1 个答案:

答案 0 :(得分:3)

编辑:<罢工>这是你的问题。 :)或不...&gt;。&gt;

Camera没有getExposureCompensation()getExposureCompensationStep()方法。这些是Camera.Parameters对象的方法!尝试将其更改为:

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